View difference between Paste ID: 58h3Kc7i and Uc3kTXMC
SHOW: | | - or go back to the newest paste.
1
<?php
2
include_once "dbconnect.php";
3
$today = date("Y-m-d);
4
$result = mysql_query("SELECT `id` FROM `programs` WHERE `uploadDate` > '2017-01-23 01:00:00'");
5-
if(!result)
5+
if (!$result) 
6
{
7-
	echo "No result";
7+
    $message  = 'Invalid query: ' . mysql_error() . "\n";
8
    $message .= 'Whole query: ' . $query;
9-
if(mysql_num_rows($result)==0)
9+
    die($message);
10
}
11-
	echo "No rows"
11+
12
while($row = mysql_fetch_assoc($result))
13
{
14
	echo $row["id"];
15
}