Re: [PHP-DB] MySQL Query not working via PHP

2003-10-18 Thread Sean Smitz
That solved the problem Steve. thanks,

Sean

"Steve Davies" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> remove the comma after cadet.photo, ie
>
> select cadet.relation2,cadet.photo FROM 
>
>
> HTH steve
>
>
> Matthew Moldvan, Jr. wrote:
>
> >I would say try single quotes instead of double quotes ... let me know if
> >that works ...
> >
> >Regards,
> >Matt.
> >
> >- Original Message - 
> >From: "Sean Smitz" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Friday, October 17, 2003 4:32 PM
> >Subject: [PHP-DB] 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



Re: [PHP-DB] MySQL Query not working via PHP

2003-10-18 Thread Steve Davies
remove the comma after cadet.photo, ie

select cadet.relation2,cadet.photo FROM 

HTH steve

Matthew Moldvan, Jr. wrote:

I would say try single quotes instead of double quotes ... let me know if
that works ...
Regards,
Matt.
- Original Message - 
From: "Sean Smitz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 17, 2003 4:32 PM
Subject: [PHP-DB] 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


   

 




Re: [PHP-DB] MySQL Query not working via PHP

2003-10-17 Thread Matthew Moldvan, Jr.
I would say try single quotes instead of double quotes ... let me know if
that works ...

Regards,
Matt.

- Original Message - 
From: "Sean Smitz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 17, 2003 4:32 PM
Subject: [PHP-DB] 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