Re: Variable in Select statement?
On 1 Oct, 11:59, GarryJones <mor...@algonet.se> wrote:
> That looks okay, but I can not get it working...
>
> The declaration
>
> $ml_collect_ind='SELECT * FROM ml_lopp WHERE scfmnum=$scfchknum AND
> " . ((in_array(loppnum, $arr_motlopp)) . " =TRUE) ORDER BY sank,
> loppnum';
>
> Gives me the following echo
>
> SELECT * FROM ml_lopp WHERE scfmnum=$scfchknum AND " .
> ((in_array(loppnum, $arr_motlopp)) . " =TRUE) ORDER BY sank, loppnum
>
> It fails to find anything valid when the first "where" condition is
> correct and the other value is in the array,
>
> Is there something in the wrong place?
>
> All appreciated
>
> Garry Jones
> Sweden
You have been told once already to use double quotes. My suggestion
used double quotes. Your test used single quotes.
|