Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
-
pedrotuga
- Forum Contributor
- Posts: 249
- Joined: Tue Dec 13, 2005 11:08 pm
Post
by pedrotuga »
Every time i need to get a value from a database i use mysql_fetch_row() and then get $row[0].
is there a simpler way to do that?
-
Oren
- DevNet Resident
- Posts: 1640
- Joined: Fri Apr 07, 2006 5:13 am
- Location: Israel
Post
by Oren »
-
pedrotuga
- Forum Contributor
- Posts: 249
- Joined: Tue Dec 13, 2005 11:08 pm
Post
by pedrotuga »
well its basically the same...
i guess we allways have to feth the result.
thanks anyway.
-
Weirdan
- Moderator
- Posts: 5978
- Joined: Mon Nov 03, 2003 6:13 pm
- Location: Odessa, Ukraine
Post
by Weirdan »
useful idiom is:
Code: Select all
list($id) = mysql_fetch_row($res);