sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
kirke's Avatar

array -> query


Question posted by: kirke (Guest) on October 18th, 2006 11:55 PM
I have a code with following data format


$datay = array(
34,42,27,45,
55,25,14,59,
38,49,32,64);
$p1 = new StockPlot($datay);


However, I want to change it to query format.
That is,

$sql_A = 'SELECT dtDateTime FROM ~~ WHERE ~~~ ';
$sql_B = 'SELECT dtDateTime FROM ~~ WHERE ~~~ ';
$sql_C = 'SELECT dtDateTime FROM ~~ WHERE ~~~ ';

After executing $sql_A,B,C Query, I can get an data A,B,C ,
respectively.

A = 34, 42, 27, 45
B = 55, 25, 14, 59
C = 38, 49, 32, 64

In that case, How can I write change the code? Moreover, actually
length of A,B,C are all different.
Is it possible? Or should I change the StockPlot function?

Thank you!!!!

2 Answers Posted
Colin Fine's Avatar
Guest - n/a Posts
#2: Re: array -> query

kirke wrote:
Quote:
Originally Posted by
I have a code with following data format
>
>
$datay = array(
34,42,27,45,
55,25,14,59,
38,49,32,64);
$p1 = new StockPlot($datay);
>
>
However, I want to change it to query format.
That is,
>
$sql_A = 'SELECT dtDateTime FROM ~~ WHERE ~~~ ';
$sql_B = 'SELECT dtDateTime FROM ~~ WHERE ~~~ ';
$sql_C = 'SELECT dtDateTime FROM ~~ WHERE ~~~ ';
>
After executing $sql_A,B,C Query, I can get an data A,B,C ,
respectively.
>
A = 34, 42, 27, 45
B = 55, 25, 14, 59
C = 38, 49, 32, 64
>
In that case, How can I write change the code? Moreover, actually
length of A,B,C are all different.
Is it possible? Or should I change the StockPlot function?
>
Thank you!!!!
>


Your question does not make very much sense to me, but I think you mean
that you have some implicit structure in your array, that you should
make explicit.

Something like

$datay = array(
array(34,42,26,45),
array(55,25,14,59),
array(38,49,32,64)
);

But I may have misunderstood what you wanted.

Colin

kirke's Avatar
Guest - n/a Posts
#3: Re: array -> query

I know my question is toooooo nonsense. Thx though :->


Colin Fine wrote:
Quote:
Originally Posted by
kirke wrote:
Quote:
Originally Posted by
I have a code with following data format


$datay = array(
34,42,27,45,
55,25,14,59,
38,49,32,64);
$p1 = new StockPlot($datay);


However, I want to change it to query format.
That is,

$sql_A = 'SELECT dtDateTime FROM ~~ WHERE ~~~ ';
$sql_B = 'SELECT dtDateTime FROM ~~ WHERE ~~~ ';
$sql_C = 'SELECT dtDateTime FROM ~~ WHERE ~~~ ';

After executing $sql_A,B,C Query, I can get an data A,B,C ,
respectively.

A = 34, 42, 27, 45
B = 55, 25, 14, 59
C = 38, 49, 32, 64

In that case, How can I write change the code? Moreover, actually
length of A,B,C are all different.
Is it possible? Or should I change the StockPlot function?

Thank you!!!!

>
Your question does not make very much sense to me, but I think you mean
that you have some implicit structure in your array, that you should
make explicit.
>
Something like
>
$datay = array(
array(34,42,26,45),
array(55,25,14,59),
array(38,49,32,64)
);
>
But I may have misunderstood what you wanted.
>
Colin


 
Not the answer you were looking for? Post your question . . .
197,010 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 197,010 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors