Re: [PHP-DB] MySQL Query not working via PHP
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
[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 begin 666 test0.1.php M/#]P:' -"B @:68H([EMAIL PROTECTED]&),:6YK(#T@;7ES<6Q?8V]N;F5C="@B;&]C86QH M;W-T(BP@(FAT='!D(BP@(B(I*2D-"B @>PT*(" @('!R:6YT*")&86EL960@ M=&[EMAIL PROTECTED];F5C="!T;R!D871A8F%S92$\8G(^7&XB*3L-"B @("!P&ET*"D[#0H@('T-"B @#0H@("11=65R>2 ] M(")314Q%0U0@(B N#0H@(" @(F-A9&5T+G)A;FLL(&-A9&5T+FQN86UE+"!C M861E="YF;[EMAIL PROTECTED];6YA;64L("(@[EMAIL PROTECTED](" @(")C861E="YA9&1R M97-S,[EMAIL PROTECTED]3PO8CX\+W1D/EQN(BD[#0H@(" @<')I;G0H(CQT M9"!B9V-O;&]R/5PB(V-C8V-C8UPB/CQB/E-T871E/"]B/CPO=&0^7&XB*3L- M"B @("!P7!E M/"]B/CPO=&0^7&XB*3L-"B @("!P7-Q;%]F971C:%]AR1D8E)O=ULG9FYA;64G77T\+W1D/EQN(BD[#0H@ M(" @("!PR1D8E)O=ULG861DR1D8E)O=ULG9W5AR1D8E)O=ULGR1D8E)O=ULG<&AO;F5?;G5M)UU]/"]T9#Y<;B(I.PT*(" @(" @ M<')I;G0H(CQT9#Y[)&1B4F]W6R=T>7!E)UU]/"]T9#Y<;B(I.PT*(" @(" @ M<')I;G0H(CQT9#Y[)&1B4F]W6R=C;VYT86-T)UU]/"]T9#Y<;B(I.PT*(" @ M('!R:6YT*"(\+W1R/EQN(BD[#0H@('T-"@T*("!Phttp://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php