Click here to Skip to main content
15,881,715 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
GeneralRe: Not sure what it's called Pin
Smithers-Jones29-Dec-10 11:02
Smithers-Jones29-Dec-10 11:02 
QuestionBest PHP Webmail system to access mail remotely Pin
mario202726-Dec-10 19:14
mario202726-Dec-10 19:14 
AnswerRe: Best PHP Webmail system to access mail remotely Pin
Gerben Jongerius26-Dec-10 20:40
Gerben Jongerius26-Dec-10 20:40 
AnswerRe: Best PHP Webmail system to access mail remotely Pin
shamly6-Jan-11 19:01
shamly6-Jan-11 19:01 
Questionmultiform post data using http thingies Pin
0b4m422-Dec-10 23:36
0b4m422-Dec-10 23:36 
AnswerRe: multiform post data using http thingies Pin
cjoki23-Dec-10 4:48
cjoki23-Dec-10 4:48 
QuestionConverting CGM to PDF (A4 only) Pin
pfsWrite21-Dec-10 20:47
pfsWrite21-Dec-10 20:47 
QuestionSQL to multidimenisonal array [modified] Pin
MacRaider420-Dec-10 8:10
MacRaider420-Dec-10 8:10 
Ok I've been searching for the last 3 - 4 hours and have come up with nothing that works. This should be simple but I guess in PHP it's not. All I want to do is run a query and put the results into an array. I've tried numerious things and nothing seems to want to work. my last attempt was using this:
$table = array();
if (mysql_num_rows($result) > 0) {
  $i = 0;
  while($table[$i] = mysql_fetch_assoc($result))
    $i++;
//  unset($table[$i]);
}

$results holds the original results of the query. I've tried using $results with a loop to do what I want and that's not working so figured an array would be simple enough. Guess not...

Table results are pretty simple too, one string and two integers: name(string), bdayMonth(int), bdayDay(int): so I'm trying to get something similar to:
John Smith,12,8
Jane Doe,11,22

modified on Monday, December 20, 2010 2:25 PM

AnswerRe: SQL to multidimenisonal array [modified] Pin
Luc Pattyn20-Dec-10 8:35
sitebuilderLuc Pattyn20-Dec-10 8:35 
GeneralRe: SQL to multidimenisonal array Pin
MacRaider420-Dec-10 8:43
MacRaider420-Dec-10 8:43 
GeneralRe: SQL to multidimenisonal array [modified] Pin
MacRaider420-Dec-10 9:29
MacRaider420-Dec-10 9:29 
GeneralRe: SQL to multidimenisonal array Pin
Luc Pattyn20-Dec-10 10:25
sitebuilderLuc Pattyn20-Dec-10 10:25 
GeneralRe: SQL to multidimenisonal array Pin
MacRaider420-Dec-10 14:46
MacRaider420-Dec-10 14:46 
AnswerRe: SQL to multidimenisonal array Pin
Luc Pattyn20-Dec-10 14:59
sitebuilderLuc Pattyn20-Dec-10 14:59 
GeneralRe: SQL to multidimenisonal array Pin
MacRaider421-Dec-10 2:06
MacRaider421-Dec-10 2:06 
GeneralRe: SQL to multidimenisonal array Pin
MacRaider421-Dec-10 7:35
MacRaider421-Dec-10 7:35 
GeneralRe: SQL to multidimenisonal array Pin
Luc Pattyn21-Dec-10 8:02
sitebuilderLuc Pattyn21-Dec-10 8:02 
GeneralRe: SQL to multidimenisonal array Pin
MacRaider421-Dec-10 10:01
MacRaider421-Dec-10 10:01 
GeneralRe: SQL to multidimenisonal array Pin
Luc Pattyn21-Dec-10 10:09
sitebuilderLuc Pattyn21-Dec-10 10:09 
GeneralRe: SQL to multidimenisonal array Pin
MacRaider421-Dec-10 14:12
MacRaider421-Dec-10 14:12 
AnswerRe: SQL to multidimenisonal array Pin
schwarzenneger21-Dec-10 18:48
schwarzenneger21-Dec-10 18:48 
GeneralRe: SQL to multidimenisonal array Pin
MacRaider422-Dec-10 1:40
MacRaider422-Dec-10 1:40 
GeneralRe: SQL to multidimenisonal array Pin
cjoki22-Dec-10 5:24
cjoki22-Dec-10 5:24 
AnswerRe: SQL to multidimenisonal array Pin
cjoki22-Dec-10 5:21
cjoki22-Dec-10 5:21 
GeneralRe: SQL to multidimenisonal array Pin
MacRaider422-Dec-10 6:02
MacRaider422-Dec-10 6:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.