Raised This Month: $ Target: $400
 0% 

mysql


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
lai
Junior Member
Join Date: Apr 2005
Old 06-05-2005 , 06:01   mysql
Reply With Quote #1

i want to update the table with the player infos
Code:
public update_frags() {
  
  new csname[32] 
  new csfrags
  new csid
  new players[32]
  new i
  new inum
  get_players(players,inum)
  for(i = 0 ;i < inum; ++i)
  {
    get_user_name(players[i],csname,32)
    csfrags = get_user_frags(players[i])
    csid = get_user_userid(players[i])
    if(dbi_num_rows(result)>0) {
      new query_b[1024]
      format(query_b,1024,"INSERT INTO Entertainment Set csid='%s',csfrags=%i,csname='%s'",csid,csfrags,csname)
      dbi_query(dbc,query_b)
      }
      else
      {
        server_print("Error")
      } 

    new query_c[1024]
    format(query_c,1024,"UPDATE Entertainment csfrags=%i,csid='%s' WHERE csname='%s'",csfrags,csid,csname) 
    dbi_query(dbc,query_c)
   
  }
  return PLUGIN_CONTINUE 
}
the update doesnt work....

Please help!
Thanks
lai is offline
 



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

Forum Jump


All times are GMT -4. The time now is 16:47.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode