is this code what im doing is correct..?
im using codeigniter framework of this one…engine use is iNNodb

db->simple_query('SET AUTOCOMMIT=0');
$lockquery = "LOCK TABLE costumer_prof WRITE";

if($db->trans_status() === FALSE) //is this ok to used trans_status without trans_start or trans_begin..?
return 1;
return 0;
$lockquery = "UNLOCK TABLE";

am i implementing the right way to lock table or better to use

$lockquery = "LOCK TABLE costumer_prof IN SHARE MODE";

hope this thread is still active..i really appreciate for those who reply …i’ll acknowledge it:)

tnx JRM for the reply..:)..

even the i only use 1 table to lock..ill do an alias on it..? i right...?..

seems so. otherwise it gets complicated.
Please mark as soled if you got it working