Register | Login | |||||
Main
| Memberlist
| Active users
| ACS
| Commons
| Calendar
| Online users Ranks | FAQ | Color Chart | Photo album | IRC Chat |
| |
0 user currently in Programming. | 3 guests |
Acmlm's Board - I2 Archive - Programming - Good * old fashioned `annoying` SQL `question`('s'); | | | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
User | Post | ||
windwaker Ball and Chain Trooper WHY ALL THE MAYONNAISE HATE Level: 61 Posts: 467/1797 EXP: 1860597 For next: 15999 Since: 03-15-04 Since last post: 4 days Last activity: 6 days |
| ||
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]]? |
|||
SyntaxLegend Double metal axe Level: 25 Posts: 109/222 EXP: 78264 For next: 11356 Since: 04-21-04 From: Australia Since last post: 20 days Last activity: 10 hours |
| ||
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.. | |||
Cellar Dweller Flurry !!! Level: 27 Posts: 180/269 EXP: 107817 For next: 8342 Since: 03-15-04 From: Arkansas Since last post: 16 days Last activity: 34 min. |
| ||
You could write something like:$res = mysql_query("SELECT * FROM footable"); 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. |
|||
windwaker Ball and Chain Trooper WHY ALL THE MAYONNAISE HATE Level: 61 Posts: 468/1797 EXP: 1860597 For next: 15999 Since: 03-15-04 Since last post: 4 days Last activity: 6 days |
| ||
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 . (edited by windwaker on 11-27-04 08:37 PM) |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
Acmlm's Board - I2 Archive - Programming - Good * old fashioned `annoying` SQL `question`('s'); | | | |