Page 1 of 1

DELETE FROM does not work

Posted: Thu Nov 03, 2011 7:00 pm
by systemous
I am trying to find out why the DELETE FROM is not working in the mysql server but i can't find it. Here is my code:

Code: Select all

<?php
	$dbcon = mysql_connect("localhost", "root", "");
	
	mysql_select_db("mydb", $dbcon);
	
	mysql_query("DELETE FROM folders WHERE deletec LIKE 'hello');
	
	mysql_close($dbcon)
?>
Any ideas? :S

Re: DELETE FROM does not work

Posted: Thu Nov 03, 2011 7:39 pm
by Celauran
The query looks fine assuming you have a column called 'deletec' and 'hello' as a value in that column.

Re: DELETE FROM does not work

Posted: Thu Nov 03, 2011 8:00 pm
by internet-solution
try

Code: Select all

mysql_query("DELETE FROM folders WHERE deletec LIKE '%hello%');