Connecting Tech Pros Worldwide Help | Site Map

array -> query

  #1  
Old October 18th, 2006, 11:55 PM
kirke
Guest
 
Posts: n/a
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  
Old October 21st, 2006, 03:45 PM
Colin Fine
Guest
 
Posts: n/a

re: array -> query


kirke wrote:
Quote:
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

  #3  
Old October 23rd, 2006, 11:05 PM
kirke
Guest
 
Posts: n/a

re: array -> query


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


Colin Fine wrote:
Quote:
kirke wrote:
Quote:
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
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to query with a space ' ' in the LIKE clause henryrhenryr answers 4 July 25th, 2007 02:27 PM
array query Francis S answers 7 April 16th, 2007 04:15 AM
Query looking back Diamondback answers 4 July 23rd, 2005 08:05 AM
a little array query Jai answers 2 July 20th, 2005 11:23 AM
Array question Irlan agous answers 5 July 17th, 2005 01:37 PM