MySQL Forums
Forum List  »  PHP

Newbie needs help with query to insert data to an existing field
Posted by: Houston Brown
Date: February 12, 2012 09:36AM

I have a file with existing data in it and I need to add some additional content (html code) to the beginnning of the existing text but only if the "title" column equals "Bar admissions"

So "existing data" becomes
"new data" + "existing data"

The new data needs to be put in before the existing data, not at the end.

Is it possible to have a variable in a query? What I mean is I wouldlike to run this query above and instead of putting in the exact same NEW DATA in each vield one thing will change and that is the id value in the new data that I am putting in. This value alos happend to be the id of the very same record I am inserting this new text into. Is there a way to extract the id of the current record and place its value in the NEW DATA?

Many thanks,
Houston

Options: ReplyQuote


Subject
Written By
Posted
Newbie needs help with query to insert data to an existing field
February 12, 2012 09:36AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.