Jump to content

[SOLVED] Help with Query


Mundo

Recommended Posts

	if (isset($_GET['submit'])) {
	$result = mysql_query(sprintf("SELECT * FROM diary WHERE diary_date = '$_GET[date]' AND diary_staff = 'Matt Black'"));
	if($result != NULL) {
		echo "<h1>Matt Black</h1>";
		while ($row = mysql_fetch_assoc($result)) {
			include "tpl/viewdiary_table.tpl";
			}
		echo "<hr />";
		}

 

I want it to test if the query gets any results and if not, then display nothing... Doesn't seem to work though but i'm sure i've done it right?! Any help?

Link to comment
https://forums.phpfreaks.com/topic/148273-solved-help-with-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.