Jump to content

php/sql update problem


raider00321

Recommended Posts

hey there, I just recently created a code which automatically generates and updates a sql database. It worked fine on my test computer, but when uploaded to my webhost I beleive the problem is that the webhost is php 4, whereas i run php 5 on my computer. Does anyone know how i can get this code to work on the webhost? The code is

Line number On/Off | Expand/Contract

 

while($row = mysql_fetch_array($result)){
$variable=mysql_fetch_array(mysql_query("SELECT woodincome FROM buildings WHERE name='$row[name]'"))or die(mysql_error());
mysql_query("UPDATE table SET info=info+('$infoinc[infoincome]'*$row[infoname])")or die(mysql_error());

 

 

Does anyone know howi can make this run on PHP4? Or is it not working for another reason.Like i said, it works on my home test server, but not my webhost.

Thanks for any help given

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.