Current location: Hot Scripts Forums » Programming Languages » PHP » Update multiple row...Loop


Update multiple row...Loop

Reply
  #1 (permalink)  
Old 01-18-06, 02:54 AM
prince prince is offline
Newbie Coder
 
Join Date: Dec 2005
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Update multiple row...Loop

Hellow
I am using a sheduler to update a table after every 30 min. but
only updating the first row from the table and not going through every row individually and performing the queries?

Anybody tell me where and how i set a loop.....

here is my code:



PHP Code:

function query($bibid,$copyid) {

    
    
$sql $this->mkSQL("select biblio_copy.*, "
                        
" biblio_hold.holdid, biblio_hold.hold_begin_dt, biblio_hold.hold_exp_dt "
                        
"from biblio_copy, biblio_hold  "
                        
"where biblio_copy.bibid = biblio_hold.bibid  "
                        
" and  biblio_copy.copyid= biblio_hold.copyid "
                        
" and  biblio_copy.status_begin_dt = biblio_hold.hold_begin_dt "
              
" and  to_days(biblio_hold.hold_exp_dt) < to_days(sysdate()) ",
                        
$bibid$copyid);

}


function 
update($copy) {
    
    
$sql $this->mkSQL("update biblio_copy set "
                        
"status_cd=%Q, "
                        
"status_begin_dt=sysdate(), ",
        
$copy->getStatusCd());
                        } 
Plz Help

Regards
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
loop through & update a mysql database ednit Perl 4 10-03-09 10:07 PM
UPDATE mysql from multiple POST rows wwanthony PHP 10 01-27-06 04:39 AM
Update Multiple Values qie PHP 20 05-26-05 02:12 PM
problem with multiple file upload and loop sita12691 PHP 0 05-03-04 03:29 PM
type mismatch and update loop - HELP! seala ASP 1 09-22-03 05:27 PM


All times are GMT -5. The time now is 06:28 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.