Jump to content

errors in SQL syntax


webguync

Recommended Posts

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

 

Link to comment
https://forums.phpfreaks.com/topic/221549-errors-in-sql-syntax/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.