ameliabob Posted June 7, 2018 Share Posted June 7, 2018 I am trying to execute the following code $qry = "DELETE FROM holdings WHERE 'rowId' = '".$row."'"; echo("alertAhead of delete. ".$qry); $result= mysqli_query($cxn,$qry)or die("FinishExit Delete failed. ".mysqli_error($cxn)." *** Qry was ".$qry); the $qry variable when filled out is DELETE FROM holdings WHERE 'rowId' = '9' but the row is still in the database when I look at it with phpAdmin and the die was not executed. If I run a query "select from holdings where rowId = '9' it is still there. I have tried using a fictitious name in the delete and the die does work for that Where should I look from here? Link to comment Share on other sites More sharing options...
dsonesuk Posted June 7, 2018 Share Posted June 7, 2018 You never use single quotes around field/column name, in certain circumstances it would be be backticks ` not '. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now