Jump to content

[SOLVED] Php with mysql


MemphiS

Recommended Posts

Is it better to INSERT() or to UPDATE() a table?  Currently i use it with a cron job to update my sites statistics every 10 minutes. this means 144 INSERTS a day.  Just wondering what others thoughts are that would know abit about this..

 

Link to comment
Share on other sites

Clearly i havent explained this well with those responces :| . All im asking is... Is it better to use an INSERT() or rather just UPDATE() the information.  I update site statistics which i already said above. EG: how many users are currently registered. In total i have 25 columns.  I could simply just go: mysql_query("UPDATE `table` SET `` = '' WHERE `` = ''"); or what im currently doing which is inserting a new row every 10 minutes.

 

:-\

Link to comment
Share on other sites

Clearly i havent explained this well with those responces :| . All im asking is... Is it better to use an INSERT() or rather just UPDATE() the information.  I update site statistics which i already said above. EG: how many users are currently registered. In total i have 25 columns.  I could simply just go: mysql_query("UPDATE `table` SET `` = '' WHERE `` = ''"); or what im currently doing which is inserting a new row every 10 minutes.

 

:-\

Uh, I have no idea why you're confused on this. Key word: Logic. I think if you re-read what you just typed, you should know that you already answered your own question. ;)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.