I'm trying to update a MySQL database but the program kept failing. I believe the problem came from the WHERE clause where the comparison failed to make a match.
Below is my query:
$query = UPDATE members SET (FstName='$txtFstName', MdlName='$txtMdlName', LstName='$txtLstName') WHERE memberID ='$usrID';
$result = mysql_query($query);
The variable $usrID is a number string passing from an update .shtml page to the .php updated page. In the database, the memberID is defined as VARCHAR(50). Please tell me why the comparison failed to match to update.
Many thanks in advance!
ljCharlie
Below is my query:
$query = UPDATE members SET (FstName='$txtFstName', MdlName='$txtMdlName', LstName='$txtLstName') WHERE memberID ='$usrID';
$result = mysql_query($query);
The variable $usrID is a number string passing from an update .shtml page to the .php updated page. In the database, the memberID is defined as VARCHAR(50). Please tell me why the comparison failed to match to update.
Many thanks in advance!
ljCharlie