| | |
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.
| Thread Tools | Search this Thread |
.htaccess ajax apache api array back basic beginner binary broken cakephp checkbox class cms code computing cron curl customizableitems database date delete display dynamic echo email error file files filter folder form forms function functions gc_maxlifetime google host href htaccess html image include insert integration ip java javascript joomla limit link login loop mail memmory memory menu mlm mod_rewrite multiple mysql navigation oop parsing paypal pdf php problem query radio random recursion regex remote script search server sessions sms snippet soap source space sql syntax system table thesishelp trouble tutorial update upload url validation validator variable video web xml youtube





