Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Price Update SQL error ?


Guest

Recommended Posts

Posted

I got the script below to update prices from my distributor list (in a mysql table) to the products tabel.

But this script is for mysql 4.0 or higher.

I got Mysql 3.23 could anyone convert this code for mysql 3.23 or isnt that possible ?

 

<?php

$link = mysql_connect("database.widexs.nl","barracu","84rr%4cu");

if(! $link)

die("Could not connect to MySQL");

else

print("Connected to MySQL server<P>");

$database = "barracudac";

mysql_select_db($database)

or die ("could not open $database: ".mysql_error() );

print "Opened database \"$database\"<P>";

 

$result = mysql_query("UPDATE products,products_temp SET products.products_price=products_temp.price WHERE products.products_model=products_temp.products_model") or die("Invalid query: " . mysql_error()); print "Opened database \"$database\"<P>";

 

mysql_close($link);

print "database closed";

?>

Archived

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

×
×
  • Create New...