Jump to content

What Am I Doing Wrong? Please Help!


Greywacke
 Share

Recommended Posts

i'm no mysql pro, but it doesn't make sense why the following would not work in PMA...should i perhaps be converting the number to a string to use in the CONCAT function? if so how would i do this?

UPDATE 8_transactionsSET (	text_TransactionEvent)VALUES (	CONCAT("Lead #",(bigint_LeadID+11001000)," Sent"))WHEREtext_TransactionEvent LIKE "%11001000%"

okay, i'd have to use the CAST function - not working replaced with CONVERT, implemented it as follows:

UPDATE 8_transactionsSET (8_transactions.text_TransactionEvent)VALUES (	CONCAT("Lead #", CONVERT(8_transactions.bigint_LeadID + 11001000, CHAR), " Sent")) WHERE 8_transactions.text_TransactionEvent LIKE "%11001000%";

this however, now gives the following result in PMA:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(8_transactions.text_TransactionEvent) VALUES (CONCAT("Lead #", CONVERT(8_transa' at line 1

oh duh. i keep getting muddled with the syntax of INSERT and UPDATE statements :)issue resolved.

Edited by Pierre 'Greywacke' du Toit
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...