Topic awaiting preservation: MySQL query for EVERYthing (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: Detroit, MI US |
posted 10-17-2002 15:38
If I were to write mysql_query("select * from table"); |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 10-17-2002 18:15
I don't know of a way to do this without at least one while loop. mysql_fetch_array gets an array for a row but I don't think there's a mysql command for getting the whole result set into a multi-dimensional array. Easy enough without though |
Bipolar (III) Inmate From: Detroit, MI US |
posted 10-17-2002 21:11
It was just everything from one table. What I meant was doing a while loop and having to query a different row every time through the while loop. I never hear of anything like that, wondered if anybody had. |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 10-17-2002 21:15
RN: I load all the data into arrays for further manipulation (very handy for recursive functions) using code like this: code: $data_count = 0;
|
Bipolar (III) Inmate From: Detroit, MI US |
posted 10-17-2002 21:47
No. I pretty much was figuring that I'd be doing something along those lines, because there is still a while loop. What I was looking for is probably best described as: |
Paranoid (IV) Mad Scientist From: Somewhere over the rainbow |
posted 10-17-2002 22:46
The poster has demanded we remove all his contributions, less he takes legal action. |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 10-18-2002 00:21
Emps, I'm still getting my head around it but I'm pretty sure your code is actually doing the same thing as mine actually. just a little longer. |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 10-18-2002 17:57
RN, |
Paranoid (IV) Inmate From: Sthlm, Sweden |
posted 10-18-2002 18:28
This is how I do it: code: //Generates the connection with the database and returns a
|
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 10-18-2002 18:45
bitdamaged: I'm pretty sure it does the same thing I just wanted a bit of extra control over the naming of things in mine script as I have been changing the names of some of my tables, etc. and the way I do it means that you don't have to change the whole script just the SQL and the bit that loads data into an array. I'll swap the neatness for the greater flexibility |
Bipolar (III) Inmate From: Detroit, MI US |
posted 10-21-2002 18:39
[edit]Move along. Nothing to see here.[/edit] |