-2

I got this warning:

PHP Warning:  date() expects parameter 2 to be long, string given in /home/xxxx/public_html/init.php on line 98

and the code:

$stats['statTodaysLinks']   = $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `DATE_ADDED` LIKE '".date ('Y-m-d', TIMENOW)."%'");
u_mulder
  • 54,101
  • 5
  • 48
  • 64
user2406612
  • 51
  • 1
  • 5

1 Answers1

2

It's your TIMENOW constant that's causing the problem by the looks of it, there's no need for it as the function will automatically use the current time if you don't supply anything.

So instead of date ('Y-m-d', TIMENOW) use date ('Y-m-d').