| | |
formulas with Mysql dynamic texts
Please support our MySQL advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Oct 2007
Posts: 34
Reputation:
Solved Threads: 0
i am trying to mutiply and add 2 dnamic texts on a php form, but i do not seem to get the reply, but i get the following results
"sum (4 + 1)"
This is the code that i typed in
The 4 is the result of `w` and 1 is the result of `d`
I would like the that two figures add up on the screen, i also need to multiply other dynamice texts.
"sum (4 + 1)"
This is the code that i typed in
(<?php echo $row_standings['w']; ?>+<?php echo $row_standings['d']; ?> The 4 is the result of `w` and 1 is the result of `d`
I would like the that two figures add up on the screen, i also need to multiply other dynamice texts.
This looks to be more of a PHP question than a MySQL question, but I think I can help. I would assign the results to variables in php and then simply add them. Like so:
This can work with multiplication too, just change the + to a *.
Hope this helps,
darkagn
php Syntax (Toggle Plain Text)
$w = $row_standings['w']; $d = $row_standings['d']; $sum = $w + $d; echo "$w + $d = $sum";
This can work with multiplication too, just change the + to a *.
Hope this helps,
darkagn
There are no stupid questions, only those too stupid to ask for help.
echo is a web developer's best friend. ![]() |
Other Threads in the MySQL Forum
- Previous Thread: Insert Unique to User...
- Next Thread: MySQL database backup
| Thread Tools | Search this Thread |
Tag cloud for MySQL
"use" 1 agplv3 alfresco amazon api artisticlicense aws bizspark changingprices communityjournalism contentmanagement contractors copyright count crm data database design developer development distinct drupal dui ec2 eliminate email enter enterprise error facebook form foss gartner gnu government gpl greenit groklaw groupware hiring hyperic images innerjoins insert ip join journalism keyword kickfire laptop legal license licensing linux maintenance mariadb matchingcolumns metron micromanage microsoft microsoftexchange mindtouch montywidenius mozilla multiple mysql mysqlcolumnupdating mysqldatetimeordermax() mysqlinternalqueries mysqlquery mysqlsearch news open-xchange opendatabasealliance opengovernment opensource operand oracle pdf penelope php priceupdating query referencedesign remove saas search select sharepoint simpledb sourcecode spotify sql statement sugarcrm techsupport thunderbird update virtualization





