Once you complete the query, you need to call a helper routine to access the data of the next row. The result array can be addressed in two ways. 1 With a numerical index, you use $myData = mysql_fetch_row( $result ); Then $myData[1] gives the second field of the current row. 2 Or $myData = mysql_fetch_array( $result ); Then $myData["id"] fetches the data in the column named "id". So to answer your question, yes the $result is an array of arrays, but don't access it directly. Multiple calls to mysql_fetch_row or mysql_fetch_array returns subsequent rows of data. Bill Kamp [EMAIL PROTECTED] (952) 681-9947
_____ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Wade Sent: Monday, April 18, 2005 1:38 PM To: [email protected] Subject: [php_mysql] SELECT * question 04182005 1333 GMT-6 If I say $sql = "SELECT * FROM table" $result=mysql_query($sql); would i be correct in thinking that, if Im calling everything then $result must be an array? Well, pointer to points? Wade [Non-text portions of this message have been removed] The PHP_mySQL group is dedicated to learn more about the PHP_mySQL web database possibilities through group learning. _____ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/php_mysql/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> . [Non-text portions of this message have been removed] The PHP_mySQL group is dedicated to learn more about the PHP_mySQL web database possibilities through group learning. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php_mysql/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
