Jump to content

Updating multiple columns with wildcards?


thomasw_lrd

Recommended Posts

I am currently working on a very large project for my job.  We have four databases on one server that are identical except for the data contained within.  We have a web front end written in php. The menu for the front end is dynamically created by a table in the database.  I need to update this table (tbl_menu_items) on 3 of the databases with the data from our development database.  I know I can use Update to do this, but I was wondering if it was possible to use wildcards, rather than have to spell out each column in the database. I've been googling all day, and I know I can spell out each column that needs to be updated. 

Something similar to this below? 

UPDATE items,month SET items.*=month.*
WHERE items.id=month.id;

Link to comment
Share on other sites

All good ideas.  I actually wrote an update query that should have worked, but I don't have shell access, only mysqladmin (which sucks btw).  I'll probably just have to delete the data, and insert it again.  Not my preffered way to work, but sometimes you've got to do what you've got to do.

 

good lad :D It's attitudes like that that get people like me so many contracts ;D

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.