slj90 Posted February 6, 2014 Share Posted February 6, 2014 I have a SQL code that works when I run it through phpmyadmin but I can't get PHP to display the results on a page. Here is my attempt: <?php require 'connect.php'; $query = "SELECT * FROM table003 WHERE status='pending' ORDER BY id ASC LIMIT 1"; $result = mysql_query($query); $row = mysql_fetch_row($result); echo $row[1]; echo $row[2]; ?> It displays nothing. Thanks --- Update: I got it working now and edited the code in this forum. Link to comment https://forums.phpfreaks.com/topic/285983-display-sql-query-results/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.