webguync Posted December 13, 2010 Share Posted December 13, 2010 anyone know why i would be getting errors in these SQL statements or how to debug? $sql3="SELECT FROM $tbl_name2(`id`,`FirstName`,`LastName`,`Username`,`Password`,`Password2`,`email`,`Zip`,`Birthday`,`Security`,`Security2`) VALUES ('$id','$FirstName','$LastName','$UserName','$Password','$Password2','$email','$Zip','$Birthday','$Security','$Security2')"; $result3=mysql_query($sql3) or die(mysql_error()); $sql5="select * from $tbl_name where username = '$UserName'"; the error(s) is just the generic one such as 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 (`id`,`FirstName`,`LastName`,`Username`,`Password`,`Password2`,`email`,`Zip' at line 1 Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted December 13, 2010 Share Posted December 13, 2010 Two problems that I see: echo $tbl_name2; Also: SELECT ?WHAT? FROM $tbl_name2 Quote Link to comment Share on other sites More sharing options...
btherl Posted December 13, 2010 Share Posted December 13, 2010 webguync, did you want to insert data to the database or select it from the database? Quote Link to comment Share on other sites More sharing options...
webguync Posted December 13, 2010 Author Share Posted December 13, 2010 with that particular SQL statement Select All, so I guess I don't need the values :-) Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted December 13, 2010 Share Posted December 13, 2010 webguync, did you want to insert data to the database or select it from the database? Haha, I missed the most obvious one :'( Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.