Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 16th, 2006, 04:08 AM
Authorized User
 
Join Date: Sep 2006
Location: , Kerala, India.
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to aneesh_sunu@yahoo.co.in Send a message via Yahoo to aneesh_sunu@yahoo.co.in
Default Delete query problem

Hai
Can you tell me the `delete query` for deleting a field from database table.
ie
ID name Image_id Email
1 abc Qw2.jpg a@a.com
2 sss ss.jpg a@a.com

I have to delete `Image_id` only from `ID`=1 row;
Anybody help me!
__________________
Regards
Aneesh
Reply With Quote
  #2 (permalink)  
Old December 17th, 2006, 11:37 PM
Friend of Wrox
 
Join Date: Oct 2003
Location: colombo, WP, Sri Lanka.
Posts: 481
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

hi try this,
if you want to delete the field from database use this
ALTER TABLE tblname DROP column Image_id

if you want to delete the records, use following
update tblname set Image_id = null where ID=1
or
update tblname set Image_id = "" where ID=1


surendran
(Anything is Possible)
http://ssuren.spaces.msn.com
Reply With Quote
  #3 (permalink)  
Old December 18th, 2006, 09:24 AM
Authorized User
 
Join Date: Sep 2006
Location: , Kerala, India.
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to aneesh_sunu@yahoo.co.in Send a message via Yahoo to aneesh_sunu@yahoo.co.in
Default

Hai Surendan
Thanks in advance for your response.
I already tried update query, i understand that delete is impossibe, only update is possible
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
php/mysql delete button and delete query dungey PHP Databases 17 April 11th, 2009 12:24 PM
delete query using trigger prashant_telkar SQL Language 1 June 19th, 2007 10:39 AM
Delete Query IanC2005 SQL Language 3 March 5th, 2006 09:56 PM
Delete Query Corey Access 2 February 12th, 2006 07:36 PM
Delete Query not working kbonney98 Access 1 April 14th, 2005 06:29 AM



All times are GMT -4. The time now is 02:51 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.