|
Posted by kirke on 11/28/06 23:28
Well, I just use the commend
printf("%s ",%L);
And, my question is changed! I find out $L=$_POST['list']; can get a
list of numbers.
And another problem is,
Let's assume that $L=1,2,3
There's a table such as
A B
11 1
12 2
13 3
14 4
15 5
16 6
Then,
$sql="select A
FROM TABLE
WHERE B in ($L)
";
can be used. After that, How can I save 11,12,13 for one variable?
my thought was,
$result= mssql_query($sql) or die();
while ($row = mssql_fetch_array($result))
{
$veh = $veh+","+$row[0]; }
But it doesn't work.....
Help me...
thx.
Peter van Schie wrote:
> kirke schreef:
> > oops, it was my mistake, I used square brackets. but still cannot
> > receive whole list of numbers. Get only first number(before first
> > comma)..
> >
>
> Hi kirke,
>
> Maybe a stupid question, but how do you check the value of $L?
> You said you're using:
>
> $L=$_POST["list"];
>
> What's the output of:
>
> echo $L;
>
> Or just do something like:
>
> print_r($_POST);
>
> to check the contents of the $_POST array.
>
> Peter.
>
> --
> http://www.phpforums.nl
Navigation:
[Reply to this message]
|