Select data using mysql_fetch_array()

94 views

how to Select data from database table using mysql_fetch_array() with PHP ?? answer goes here:

  1. <?
  2. $result = mysql_query("select * from users order by id");
  3. if(!$result) echo mysql_error();
  4. else {
  5. while($row = mysql_fetch_array($result,MYSQL_ASSOC)) {
  6. echo "$row[id] - $row[Password] - $row[Name] -
  7. $row[email] - $row[ts]
  8. \n";
  9. }
  10. }
  11. ?>



« Selecting query in MySQL Using DATE_FORMAT in MySQL »
Posted on Monday, March 9th, 2009 at 4:33 pm under Basic of MySQL | RSS 2.0 Feed

One Response to “Select data using mysql_fetch_array()”

  1. Index - MySQL basic Says:

    [...] MySQL database 3. Creating MySQL table 4. Insert Query in MySQL 5. Selecting query in MySQL 6. Using mysql_fetch_array() 7. Using DATE_FORMAT in MySQL 8. Using UPDATE in MySQL « Data about pesidential [...]


Post Comment

You must be logged in to post a comment.



ComputerEducationWorld.com All Rights Reserved © RSS | CBSE | Education Boards Of India | What is My IP?