Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - Good * old fashioned `annoying` SQL `question`('s');
  
User name:
Password:
Reply:
 

UserPost
windwaker
Posts: 468/1797


Wow, I didn't know that I was right XD.

Thanks.

Oooh, and thanks for the script; I needed to develop one like that anyway .
Cellar Dweller
Posts: 180/269
You could write something like:

$res = mysql_query("SELECT * FROM footable");
$rows = 0;
while ($omg[$rows] = mysql_fetch_array($res)) {
$rows++;
}
mysql_free_result($res);


Then use $omg[row][column] to access data. The $rows varible will hold the total number or rows.

You may want to see http://www.php.net/manual/en/language.types.array.php#language.types.array.foo-bar.
SyntaxLegend
Posts: 109/222
actually i think its exactly like that, or the other way around.. but looking in the acmlmboard code. It seems to use that alot. So yeah..
windwaker
Posts: 467/1797
Yes, lame title .

Here's something I've been looking for for a while and I haven't been able to find the answer .

When I fetch an array into a variable (let's say $omg), and I want to select a column, I go $omg[columnname]. Is there a way in which I can select a row like this, too? Like (doubt this works), but something like $omg[[row][column]]?
Acmlm's Board - I2 Archive - Programming - Good * old fashioned `annoying` SQL `question`('s');


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.010 seconds.