Hi can anybody please tell me if I am locking & unlocking tables correctly? I am getting the error:
You have an error in your SQL syntax near 'education,experience WRITE' at line 1
The code is:
// includes
include("../database/common_db.php");
// open database connection
$link_id = db_connect('lee_db');
// generate and execute query
$lock = mysql_query("LOCK TABLES personal,education,experience WRITE", $link_id) or die(mysql_error());
$editpersonal = mysql_query($querystring, $link_id) or die(mysql_error());
$editeducation = mysql_query($querystring2, $link_id) or die(mysql_error());
$editexperience = mysql_query($querystring3, $link_id) or die(mysql_error());
$unlock = mysql_query("UNLOCK TABLES", $link_id) or die(mysql_error());
I've taken the actual querystrings out for this example because they're tool ong but the queries run successfully if I comment the Lock and Unlock code out of the above. Any ideas?