A
|
alang 5/7/2008 |
You are doing the right thing for display but if you want to write the value back to the database you will need to add some more code using SQL UPDATE command. |
N
|
nelly author 5/7/2008 |
You are doing the right thing for display but if you want to write the value back to the database you will need to add some more code using SQL UPDATE command.
|
J
|
Jane 5/8/2008 |
Hi, UPDATE TableName set Saloon=Price+5 |
N
|
nelly author 5/8/2008 |
Hi, to update records in the database execute UPDATE query in the database directly. Here is a sample:
|
J
|
Jane 5/8/2008 |
Execute UPDATE query in the database directly (use any MySQL administrative tool for that). |
N
|
nelly author 5/8/2008 |
Execute UPDATE query in the database directly (use any MySQL administrative tool for that).
|
J
|
Jane 5/8/2008 |
Here is the correct query: UPDATE `_estimate` SET saloon=price+0
|
N
|
nelly author 5/8/2008 |
Hi again ! I have tried that and i still get the syntax error this is what i have done SELECT id, collection, destination, price, vehicle, saloon, estate, mpv, mpvplus, eightseater FROM `_estimate` UPDATE `_estimate` SET saloon=price+0 just comes up with syntax SQL error !! is my syntax correct? Sorry for being a complete moron !! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=29005&image=1&table=forumreplies' class='bbc_emoticon' alt=':unsure:' />
|
J
|
Jane 5/8/2008 |
Use Before record added/Before record updated events for this purpose. $values["saloon"] = $data["price"]+5; //for the saloon field |
N
|
nelly author 5/8/2008 |
Use Before record added/Before record updated events for this purpose. Here is a sample:
|
J
|
Jane 5/8/2008 |
Sorry for my fault. $values["saloon"] = $values["price"]+5; //for the saloon field |
N
|
nelly author 5/8/2008 |
Sorry for my fault. Here is the correct code:
|