Posted by tritone on 06/28/07 18:41
$sql = "DELETE FROM " . $mosConfig_dbprefix . "foo WHERE foo_id = '" .
mosGetParam($_POST, 'cid', '' )[$a] . "'";
was throwing errors and I fixed it be doing this:
$cidx = mosGetParam( $_POST, 'cid', '' );
$sql = "DELETE FROM " . $mosConfig_dbprefix . "foo WHERE foo_id = '" .
$cidx[$a] . "'";
My question is why didn't the first version work and is there a way to
code it without adding the intermediate variable?
[Back to original message]
|