| | |
Delete rows from database
Please support our MySQL advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2008
Posts: 89
Reputation:
Solved Threads: 0
I'm trying to delete rows from my database by using an HTML form. I can retrieve the database and display it nicely in a table using this code:
Now I would like to add a checkbox beside each item that will delete it. Possibly be able to check multiple items and delete them by clicking a Delete button at the bottom of the table. Can anybody help me get started or point me to a good tutorial? Any help would be greatly appreciated.
MySQL Syntax (Toggle Plain Text)
<table width="889" border="1"> <tr> <td width="206" bgcolor="#999999"><div align="center"><strong>Site</strong></div></td> <td width="549" bgcolor="#999999"><div align="center"><strong>Reason</strong></div></td> <td width="112" bgcolor="#999999"><div align="center"><strong>Date Added</strong></div></td> </tr> <?php $row_count = 0; $columns = 3; while ($row = mysql_fetch_assoc($result)) { if ($row_count == $columns) { echo "</tr><tr>"; $row_count = 0; } echo "<tr><td>"; echo $row['Site']; echo "</td><td>"; echo $row['Reason']; echo "</td><td>"; echo $row['Date']; echo "</td>"; $row_count++; } ?> </tr> </table>
![]() |
Similar Threads
- Change and delete rows in a sql-database (Java)
- How do i get a datagrid to update & delete rows. (ASP.NET)
- Delete all rows from table in javascript (JavaScript / DHTML / AJAX)
- Deleting an item from a database by selecting it from a drop-down menu (PHP)
- insert multiple rows in database (MS SQL)
- Deleting the database rows and adding new rows (Visual Basic 4 / 5 / 6)
Other Threads in the MySQL Forum
- Previous Thread: find in set BIG PROBLEM do not understand this
- Next Thread: How to handle poli-morphism using MySQL
| Thread Tools | Search this Thread |
agplv3 alfresco amazon api artisticlicense aws bizspark breathalyzer camparingtocolumns cmg communityjournalism contentmanagement contractors copyright count court crm database design developer development distinct drupal dui ec2 email enterprise eudora facebook form foss gartner gnu government gpl greenit groklaw hiring hyperic images innerjoins insert ip joebrockmeier join journalism keyword keywords kickfire law legal license licensing linux maintenance managing mariadb matchingcolumns metron micromanage microsoft microsoftexchange mindtouch montywidenius mozilla multiple music mysql mysqlcolumnupdating mysqldatetimeordermax() mysqlindex mysqlinternalqueries mysqlquery mysqlsearch news open-xchange opendatabasealliance opengovernment opensource oracle penelope php priceupdating query referencedesign reorderingcolumns resultset saas select sharepoint simpledb sourcecode spotify sql sugarcrm syntax techsupport thunderbird transparency virtualization





