ChrisMartino Posted February 19, 2010 Share Posted February 19, 2010 ok so i have some information in these tables but it wont echo the data this is how i am trying to echo it: // Grabs the current downloads $NameDownload = "Downloads"; $DownloadQuery = mysql_query("SELECT * FROM site WHERE name = '".$NameDownload."'"); $DownloadFetch = mysql_fetch_array($DownloadQuery); $Downloads = $DownloadFetch['Contents']; echo $Downloads; But it doesn't echo anything?. Link to comment https://forums.phpfreaks.com/topic/192656-mysql-wont-echo/ Share on other sites More sharing options...
Catfish Posted February 19, 2010 Share Posted February 19, 2010 verify your data. print_r($DownloadFetch); if there's nothing there something is failing. Link to comment https://forums.phpfreaks.com/topic/192656-mysql-wont-echo/#findComment-1014943 Share on other sites More sharing options...
SpankMarvin Posted February 19, 2010 Share Posted February 19, 2010 I think you are producing a multidimensional array here. Try the following. I'm assuming you want a list of the "contents" rows from your results... // Grabs the current downloads $NameDownload = "Downloads"; $DownloadQuery = mysql_query("SELECT * FROM site WHERE name = '".$NameDownload."'"); $DownloadFetch = mysql_fetch_array($DownloadQuery); echo("<ul>"); foreach($DownloadFetch as $row){ $Downloads = $row['Contents']; echo("<li>".$Downloads."</li>"); } echo("</ul>"); Any luck? Link to comment https://forums.phpfreaks.com/topic/192656-mysql-wont-echo/#findComment-1014949 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.