How to convert sql statement to multi array

This is a discussion on "How to convert sql statement to multi array" within the PHP Forum section. This forum, and the thread "How to convert sql statement to multi array are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jan 19th, 2008, 13:04
New Member
Join Date: Jan 2008
Location: Malaysia
Age: 21
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Smile How to convert sql statement to multi array

hi
i am newbie for php , now i facing problem like this
How to change this sql statement to this multi array format
Code: Select all
                  19/2/2007    21/3/08   2/1/2008  4/3/2008  <--UPLOAD_DATE                                                                                           
TotalRawAMount     1000          2011         1111      2333
TotalFGAmount        212           122          21         21
TotalWIPAmount      212            122          21        211
$arrData[0][0] =""
$arrData[1][0] = "TotalRawAmount";   
$arrData[2][0] = "TotalFgAmount";
$arrData[3][0] = "TotalWIPAmount";
 data for TotalRawAmount
$arrData[1][1] = 1000;
$arrData[1][2] = 2011;
$arrData[1][3] = 1111;
$arrData[1][4] = 2333;
// Dara for TotalFGAmount
$arrData[2][1] = 212;
$arrData[2][2] = 122;
$arrData[2][3] = 21;
$arrData[2][4] = 21;
// Data for TotalWIGAmount
$arrData[3][1] = 212;
$arrData[3][2] = 122;
$arrData[3][3] = 211;
$arrData[3][4] = 21;
DataFOr UPload_date
$arrDate[0][1]=19/2/07
$arrDate[0][2]=21/3/08
$arrDate[0][3]=2/1/08
$arrDate[0][4]=4/3/08
thanks

Last edited by Rakuli; Jan 20th, 2008 at 10:05. Reason: Popped in some [code] tags
Reply With Quote

  #2 (permalink)  
Old Jan 20th, 2008, 10:06
Rakuli's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to convert sql statement to multi array

Okay, so that's not an SQL query it is just some data.

How are you pulling the data out of the database and what is the table structure? It's impossible to answer your question with the given info.

Cheers
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi-league and Multi-tiered team schedule overkil6 Website Planning 3 Jun 17th, 2008 22:04
multi dimensional array sort by x but randomize where x is equal nate2099 PHP Forum 0 Jan 21st, 2008 09:17
How can you convert an array of ints into a string (C language) learneralways Other Programming Languages 1 Dec 1st, 2005 20:57
Sorting a new array from an existing array Ozeona Flash & Multimedia Forum 2 Sep 20th, 2005 08:43
array unable to check another array so as to be displayed Ozeona Flash & Multimedia Forum 1 Aug 5th, 2005 10:26


All times are GMT. The time now is 07:19.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43