A
|
acpan 1/31/2021 |
You may not need to use SQL "User-Defined " variables (@number, @contact_num .. etc.) at all, although it went without error on my PHPRunner 10.05 when i replicate your statement.
|
R
|
rmac author 2/1/2021 |
You may not need to use SQL "User-Defined " variables (@number, @contact_num .. etc.) at all, although it went without error on my PHPRunner 10.05 when i replicate your statement. SQL's user-defined variable store a value in one statement and refer to it later in another statement. This enables you to pass values from one statement to another within eg. store procedures, or used to evaluate a result in a subquery that passes to the main query. But it seems it is not necessary for your case. You can simply extract the contact_num, based on values of another field without SQL's user-defined variables:
|