Difference between revisions of "Add, delete, modify mysql data with php"
From thelinuxwiki
(Pushed from thelinuxwiki.com.) |
m (moved Add, delete, modify mEditing Add, delete, modify mysql data with phpysql data with php to Add, delete, modify mysql data with php) |
Latest revision as of 22:19, 25 February 2013
insert example 1:
$query = "INSERT INTO ineedlist VALUES (,'$name','$type','$user','$strikethrough')"; mysql_query($query);
change example 1:
$update=mysql_query("UPDATE ineedlist SET strikethrough='1' WHERE id='$astrikethrough[$i]'") or die (mysql_error());
delete example 1:
$update=mysql_query("DELETE FROM dbasename WHERE var='value'") or die (mysql_error());
delete example 2:
$update=mysql_query("DELETE FROM ineedlist WHERE id='$astrikethrough[$i]'") or die (mysql_error());