Quote:
Originally Posted by kronnos
How would I create an additional colum that would AUTO_INCREMENT from a number I specify (After i check for last number in "To_paymentinfo" table)?
|
You can do this to change the next value of an autoincrement column:
Code:
ALTER TABLE tablename AUTO_INCREMENT=X
Quote:
Also, do do this:
subscriptionsubid ------------ < --- ("2" IF above field mc_gross is 4, "1" IF above field mc_gross is 6, "0" IF above field mc_gross is 10)
I would probably end up running 3 different queries based on the number in the mc_gross field. Would I be able to create a query that says "Only run IF that field value is x?
|
You could use CASE:
Code:
CASE mc_gross WHEN 4 THEN 2 WHEN 6 THEN 1 ELSE 0 END
I think that can be used in place of mc_gross when listing columns in a SELECT.