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(2@D9&),: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=&\@8V]N;F5C="!T;R!D871A8F%S92$\8G(^7&XB*3L-"B @("!P<FEN="@B M06)O<G1I;F<A/&)R/EQN(BD[#0H@(" @97AI="@I.PT*("!]#0H@( T*("!I M9B@A*"1D8E)E<W5L=" ](&UY<W%L7W%U97)Y*")54T4@<V5A8V%D971S(BP@ M)&1B3&EN:RDI*0T*("![#0H@(" @<')I;G0H(E5N86)L92!T;R!U<V4@<V5A M8V%D971S(&1A=&%B87-E(3QB<CY<;B(I.PT*(" @('!R:6YT*")!8F]R=&EN M9R$\8G(^7&XB*3L-"B @("!E>&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;F%M92P@8V%D970N;6YA;64L("(@+@T*(" @(")C861E="YA9&1R M97-S,2P@8V%D970N861D<F5S<S(L(&-A9&5T+F-I='DL(&-A9&5T+G-T871E M+"!C861E="YZ:7!C;V1E+"!C861E="YE;6%I;"P@(B N#0H@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0H M(CQT9#Y[)&1B4F]W6R=P:&]T;R==?3PO=&0^7&XB*3L-"B @(" @('!R:6YT M*"(\=&0^>R1D8E)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*("!P<FEN="@B/"]T86)L93Y< (;B(I.PT*/SX` ` end -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php