Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
MySQL saving multiple entries at once.
Old 04-02-2007, 07:13 PM MySQL saving multiple entries at once.
Skilled Talker

Posts: 62
Name: Daniel
Trades: 0
I have a webapp I'm developing where a user can submit items to the website. An admin of the site can then go in and Approve or Delete multiple entries at once. What I'm having a problem with is editing multiple entries at once.

I have no problem getting selected entries out of the table. But I have absolutely no idea how I would go about changing multiple entries in a table in one query.

Any ideas?
castis is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-02-2007, 07:37 PM Re: MySQL saving multiple entries at once.
Skilled Talker

Posts: 62
Name: Daniel
Trades: 0
Nevermind on that one! If anyone else is having this same problem heres a great place to go to figure it out!

http://www.phpeasystep.com/mysqlview.php?id=10
castis is offline
Reply With Quote
View Public Profile
 
Old 04-03-2007, 06:55 AM Re: MySQL saving multiple entries at once.
damien_ls's Avatar
Layershift

Posts: 474
Name: Damien
Trades: 0
Yep, SQL doesn't support arrays (I'm not aware of any dialect that does at least?) as it's set based.

You need to use some procedural code to iterate through the array and execute multiple SQL queries - you could always create a user defined function to do this in the database rather than in your scripting language (e.g. PHP), but I'm not sure there is any significant advantage?
__________________

Please login or register to view this content. Registration is FREE
:: DDS & Dedicated, UK & USA-based
Please login or register to view this content. Registration is FREE
, Reseller & Shared Hosting
Experienced Parallels Platinum Partners (Plesk since 2001, Virtuozzo since 2003)
damien_ls is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to MySQL saving multiple entries at once.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.33901 seconds with 12 queries