philosophology wrote:I tried it and the moment the ':' is in there mysql_fetch_row throws and exception.
Since you are not using prepared statements, you need to actually substitute the placeholder with some value or variable, e.g.,
$id = 123;
$sql = "SELECT * FROM tblTABLE WHERE A='1' AND B='1' AND id>$id ORDER BY id LIMIT 1";
$result = mysql_query($sql);
That said, why not use the PDO extension?