Delete record in MySQL with php targeting auto_incremented int?

Posted by Chris_45 on Stack Overflow See other posts from Stack Overflow or by Chris_45
Published on 2010-03-15T13:34:58Z Indexed on 2010/03/15 13:49 UTC
Read the original article Hit count: 199

Filed under:
|
|
|

Why doesnt this delete work to delete the whole record:

$query = 'DELETE FROM tblEvents WHERE index = $_GET["id"]';
$result = mysql_query($query, $db) or die(mysql_error($db));

Where index is variable of type int, auto_incremented in MySQL?

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql