2

If I use the following code my "row lock" works fine:

mysqli_query($link, 'START TRANSACTION');
mysqli_query($link, 'SELECT * FROM '. $table .' WHERE id=1 FOR UPDATE');

Unforunatly my server doesn't support "mysqli". Is it true that the following (with "mysql") doesn't work?

mysql_query($link, 'START TRANSACTION');
mysql_query($link, 'SELECT * FROM '. $table .' WHERE id=1 FOR UPDATE');

Is there a workaround? Thanks

user606249
  • 71
  • 3

1 Answers1

3

OK - If I use

mysql_query('START TRANSACTION', $link);...

instead of

mysql_query($link, 'START TRANSACTION');...

it works.

user606249
  • 71
  • 3