Hi, I have a error message when I try and execute the following code

    $ccid = cleanQuery($_SESSION['cid']);
    $ip = $_SERVER['REMOTE_ADDR'];
$today = date('Y-m-d');
// check to see how many entries in the tbllog have already been entered
$qry5 = mysql_query("SELECT count(id) AS total FROM tbllog WHERE cid=$ccid AND action='EMAIL_REFER' AND datetime LIKE'$today%' GROUP BY ipaddress");
//echo $num_email = mysql_num_rows($qry5);
$row3 = mysql_fetch_array($qry5);
$num_email = $row3['total'];

Recommended Answers

All 2 Replies

the error is resource id#16 when i try and run the query :(

Member Avatar for diafol

Chunk up your SQL to see which bits are causing the issue. Take out the WHERE clause to see if it works. Then start adding bits. BTW - place a space between LIKE and '$today%'

What's the full error message?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.