SQL delete query
mdb Offline
Junior Member
**
Posts: 27
Joined: May 2012
Post: #1
SQL delete query
Hey guys,
So I am running an sql query and having a while loop return all the information for me in an html table. What I would like to do is also make a button on each row of the table that when clicked is able to delete that row from the sql. Does anyone have a good tutorial on how this can be accomplished?

Basically the while loop grabs this information from the sql table:

Code:
$row['name']
$row['ip']
$row['ban']


Then I would like to make another query like this:

Code:
$delete = mysql_query("DELETE FROM ".$table." WHERE ".$row['name']." AND ".$row['ip']." AND ".$row['ban']." LIMIT 1");


And place a button beside each row in the html table that deletes that row. Hopefully that makes sense haha. Is this possible? How would I go about doing it?

Cheers!

10-21-2012 05:30 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
SQL delete query - mdb - 10-21-2012 05:30 PM
RE: SQL delete query - ZiNgA BuRgA - 10-21-2012, 10:01 PM
RE: SQL delete query - mdb - 10-22-2012, 03:00 AM
RE: SQL delete query - ZiNgA BuRgA - 10-22-2012, 09:14 AM
RE: SQL delete query - mdb - 10-23-2012, 09:40 AM
RE: SQL delete query - ZiNgA BuRgA - 10-24-2012, 08:19 AM
RE: SQL delete query - devid456 - 07-06-2013, 12:45 AM

 Standard Tools
Forum Jump: