[PHP-DB] or statement in url

2002-07-18 Thread Matthew K. Gold
can I use an OR operator in a variable that is passed through a url? ex. how can I combine the following two lines so that I end up with records that have an id of either 1 or 2? http://www.xyz.com/foo.php?FooID=1 http://www.xyz.com/foo.php?FooID=2 (I tried the following, but it didn't work:

Re: [PHP-DB] or statement in url

2002-07-18 Thread Martin Clifford
Pass different variables and use them both in your query. http://www.xyz.com/foo.php?FooID=1 http://www.xyz.com/foo.php?Foo2ID=2 $query = SELECT * FROM table WHERE id=$FooID OR id=$Foo2ID; HTH Martin Clifford Homepage: http://www.completesource.net Developer's Forums:

Re: [PHP-DB] or statement in url

2002-07-18 Thread Steve Cayford
How about http://www.xyz.com/foo.php?FooID[]=1FooID[]=2 Then FooID will be an array of the values. -Steve On Thursday, July 18, 2002, at 03:20 PM, Matthew K. Gold wrote: can I use an OR operator in a variable that is passed through a url? ex. how can I combine the following two lines so

RE: [PHP-DB] or statement in url

2002-07-18 Thread Beau Lebens
// To: [EMAIL PROTECTED]; [EMAIL PROTECTED] // Subject: Re: [PHP-DB] or statement in url // // // Pass different variables and use them both in your query. // // http://www.xyz.com/foo.php?FooID=1 // http://www.xyz.com/foo.php?Foo2ID=2 // // $query = SELECT * FROM table WHERE id=$FooID OR id