Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > Linux, Apache, MySQL > MySQL Help

MySQL Help Post any question relating to MySQL here and hopefully someone can help

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2004-09-21, 02:49 AM
Junior Member
 
Join Date: Jul 2004
Posts: 11
prolong199
Default

I am trying to delete the contents of a table and i am using the statement

delete from "table"

but its not working, i think it is because although i have connected to the database it doesn't know what db and what table to delete from. Can someone please help me solve this very simple problem?
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 2004-09-21, 07:01 AM
Moderator
 
Join Date: May 2004
Location: Portugal
Posts: 143
gesf is an unknown quantity at this point
Send a message via ICQ to gesf Send a message via MSN to gesf Send a message via Skype™ to gesf
Default

What error are you getting !?
Maybe you're making something wrong!
Code:
// This is wrong
delete from "table"

// This is right
delete from table
If you have successfuly connected to the DB and the table exists, it should work!

Cheers
__________________
Best Regards,
Gonçalo "GesF" Fontoura

Website : gesf.org
Reply With Quote
  #3 (permalink)  
Old 2004-10-03, 07:28 AM
veedee
Guest
 
Posts: n/a
Default

I use this query to delete all content in a table
delete from table where 1=1;
___________________
free ebooks mysql | free ebooks download
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.5 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.5 (a popular PHP IDE) and NuCoder 2.0 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:36 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.