SQL guru needed!
| From: | Russ | Date: | Tue, 20 Aug 2002 07:59:16 +0000 |
| Subject: | SQL guru needed! | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-21243@lists.php.net to get a copy of this message | ||
Hiya folks:
I wish to be able to select items from MySQL if a variable passed via
the $_GET method to my PHP4 page is introduced thus:
$sql = "SELECT TourName,TourID,$_GET[CatID] IN (TourCatID) FROM tour";
When I echo $sql to the page, the query looks fine but doesn't work, in
as far as the wrong results are returned. MySQL doesn't throw up an
error either.
I'm using MySQL 3.23.49-nt-log. Can anyone enlighten me please ??
Cheers
Mr Russ Michell
Web Applications Developer
Itomic.com
Email: russ@itomic.com
Tel: +61 (0)8 9321 3844
Fax: +61 (0)8 6210 1364
Post: PO Box 228, Innaloo, WA 6918, Australia
Street: Suite 24, 158 William St, Perth, WA 6000, Australia
"No proof of existence is not proof of non-existence."
(Physicist: Stanton T. Friedman on Debunking Ufology)