| | |
Hot to delete
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Feb 2008
Posts: 2
Reputation:
Solved Threads: 0
Dear members how i can delete a record from a table in php?Give me the code plz...
Last edited by bihartourism; Feb 23rd, 2008 at 3:44 am.
there is nothing special or specific to PHP,
use your normal SQL statement with PHP for example with MySQL
use your normal SQL statement with PHP for example with MySQL
PHP Syntax (Toggle Plain Text)
mysql_query("DELETE FROM my_table WHERE id = 1");
Last edited by apsivam; Feb 23rd, 2008 at 4:01 am.
try modify this code to suit what you want
PHP Syntax (Toggle Plain Text)
$name= "record to delete" $sql = "DELETE FROM Users WHERE Name= '$name'"or die ("ERROR: Cannot not find user!"); $result = mysql_query($sql) or die ("Error in query: $sql. ".mysql_error());
If you find this useful you can add to my reputation
![]() |
Similar Threads
- Disk Warrior: Delete contiguous space? (Mac Software)
- Help me get rid of hot offers (Viruses, Spyware and other Nasties)
- How do I get rid of "hot corners"? (Mac tips 'n' tweaks)
- Hot Offers Hijack and Others (Viruses, Spyware and other Nasties)
- Help me get rid of hot offers (Viruses, Spyware and other Nasties)
- i cannot delete any junkmail in my hotmail (Web Browsers)
Other Threads in the PHP Forum
- Previous Thread: Dynamic Declaration of Arrays Keys
- Next Thread: How twitter.com adds twitter@twitter.com to Gtalk to update a user group posts.
Views: 507 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl database date directory display download dynamic ebooks echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla jquery js limit link login loop mail mediawiki menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote script search select server sessions sms soap source space speed sql stored structure subdomain syntax system table tutorial update updates upload url validation validator variable video web xml youtube





