Hi there,
I have a problem in sql query execution.I am using this sql query:
$userid = 1;
$sql = mysql_query("
SELECT ID, Nm, Address, date_format(DateOfBirth, '%d%M%Y') as DateOfBirth
FROM PersonalDetails where UserMasterID = $userid
") or die (mysql_error());
The result appears 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 '= ' at line 1
When I execute this in PHPMyAdmin it works properly. I am using mysql(5.0.5b) and PHP (5.2.6)
Can you help me please?