PHP/ MYSQL Scripts

I have a couple of things, php, that I need to work out.


I have a php script that gives me the following output:



&data1=;219.4380; 103.2000; 26.0000; 12.7960; 45.3120; 106.0000; 2662.6000; 462.3280; 168.8800; 261.2960;


Which is almost what I need I am using this:

// Print Title

print "&title=Title;1;2;3;4;5;n";

print "";

print "&data1=;";

// Print Result


while ($row = mysql_fetch_object($result)) {

print "$row->value;rn";




The first question is, is there a way for the &title=Title; to reflect automatically the number of "value" results without hardcoding the column title? And the second question is.. the $row->value; gives me 10,9,8,7,6,5,4,3,2,1 because I am using the DESC function in the mysql query to get to the end of the database. Is there a way to reverse the output so that I get 1,2,3,4,5,6,7,8,9,10 where 10 represents the last row in the database?


The second part of the question has to do with a mysql query. When I use phpmyadmin to test the query all is well but the create php doesn't seem to work right. The query that I'm using in phpmyadmin is

SET @runningTotal :=0;

SELECT value, @runningTotal := value + @runningTotal AS newvalue

FROM orders_total

WHERE class = 'ot_total'

LIMIT 0 , 30

How do I write that in php?


Ok that's all for now. If you are available please let me know how much it would cost to answer those questions and I'll pay right away through GAF.


Daniel M. May

Taidot: PHP

Näytä lisää: php * *, * * php, * php, pay php, Mysql questions, how to create a database using php, how do i write, 30 second scripts, php end script, php create function, php &&, && php, get php, rn, php, php test, Mysql, mysql test, mysql query, gaf

Tietoa työnantajasta:
( 1 arvostelu ) Afghan, Afghanistan

Projektin tunnus: #15504

Myönnetty käyttäjälle:


Hi, i'm experienced php/mysql coder and I can give you the answers RIGHT NOW by $30 which is a MINIMAL ALLOWED BID so why wait? ;-) thanks

$30 USD 0 päivässä
(3 Arvostelua)

7 freelanceria on tarjonnut keskimäärin %project_bid_stats_avg_sub_26% %project_currencyDetails_sign_sub_27% tähän työhön


Can answer to all questions. Thanks.

$50 USD 0 päivässä
(385 arvostelua)

Please See PMB.

$30 USD 1 päivässä
(5 arvostelua)

Daniel, There are multiple ways to answer your questions, provided I understand your questions correctly. If you just want a count of the values returned from your query, you can get this by running the mysql_num_ro Lisää

$30 USD 0 päivässä
(8 arvostelua)

can answer them right now .. thanks apuva m

$40 USD 1 päivässä
(0 arvostelua)

please look at pm

$30 USD 0 päivässä
(0 arvostelua)

Easy answers - the answer to your first is "ORDER BY ASC" instead of "DESC" - I can tell you more soon...PM me

$35 USD 3 päivässä
(0 arvostelua)