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
https://forums.phpfreaks.com/topic/90193-phpsql-update-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.