Re: MySQL Query not working via PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I would say try single quotes instead of double quotes ... let me know if
that works ...

Regards,
Matt.

----- Original Message ----- 
From: "Sean Smitz" <stsmitz@comcast.net>
To: <php-db@lists.php.net>
Sent: Friday, October 17, 2003 4:32 PM
Subject:  MySQL Query not working via PHP


> I have a query that works in MySQL but when I try to execute it in PHP I
> encounter the following error:
>
> //Generated by the script
> Couldn't execute query!
>
> // Generated by MySQL
> MySQL reports: You have an error in your SQL syntax. Check the manual that
> corresponds to your MySQL server version for the right syntax to use near
> 'FROM cadet, cadet_phone WHERE cadet.ssn = cadet_phone.ssn AND (
>
> //Query outputted by the script
> Query was: SELECT cadet.rank, cadet.lname, cadet.fname, cadet.mname,
> cadet.address1, cadet.address2, cadet.city, cadet.state, cadet.zipcode,
> cadet.email, cadet.guardian1, cadet.relation1, cadet.guardian2,
> cadet.realtion2, cadet.photo, FROM cadet, cadet_phone WHERE cadet.ssn =
> cadet_phone.ssn AND (cadet.lname = "Smith" AND cadet.fname = "John" AND
> cadet.mname = "Doe")
>
> Attached is the entire page. Any help is appreciated.
>
> Sean Smitz
>
>
>
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux