Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SQL query syntax?


Guest

Recommended Posts

Posted

I'd like to do somthing like this:

 

UPDATE zipcodes_us SET zipcodes_us.state_name = zones.zone_name WHERE zipcodes_us.state = zones.zone_code;

 

I am trying to set the values in the table 'zipcodes_us' based on values from table 'zones' Thanks in advance for any help.

Posted

UPDATE zipcodes_us, zones SET zipcodes_us.state_name = zones.zone_name WHERE zipcodes_us.state = zones.zone_code;

 

I think you just need to add the zones table in the list of tables, even if you don't update the table.

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Posted
UPDATE zipcodes_us, zones SET zipcodes_us.state_name = zones.zone_name WHERE zipcodes_us.state = zones.zone_code;

 

I think you just need to add the zones table in the list of tables, even if you don't update the table.

doh! Thanks Carine. :)

Archived

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

×
×
  • Create New...