Pavlin24 Posted April 25, 2014 Share Posted April 25, 2014 Hello there, some help in this? Is it possible to calculate numeric data in table with data coming from forms? I mean something like this: mysql_query("UPDATE ov SET dt_ob=(dt_ob+'$suma1') WHERE smetka='$debit' ",$con) dt_ob and smetka are coloumns in the table, $suma1 and $debit are data coming from form. The code above do not work to me. Link to comment Share on other sites More sharing options...
justsomeguy Posted April 25, 2014 Share Posted April 25, 2014 If you're trying to add numbers, then remove the quotes. Quoted things are strings, not numbers. Link to comment Share on other sites More sharing options...
Pavlin24 Posted April 26, 2014 Author Share Posted April 26, 2014 Yes, that may be a problem too. But the main problem was that I had to pass the query trough mysql_fetch_array() function. It works now. Thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now