Whats wrong with my SQL syntax?

  • RedBMedia
  • Proficient
  • Proficient
  • User avatar
  • Posts: 315

Post 3+ Months Ago

Can you tell me whats wrong here???

Code: [ Select ]
SELECT count( * ) AS COUNTER, DATE( date ) AS DATER FROM results WHERE feedid = '$feedid' AND date >= '$dateFrom 00:00:00' AND date <= '$dateTo 23:59:59' GROUP BY DATE( date )


$feedid, $dateFrom, and $dateTo are all variables filled previously with PHP. Have any ideas!? I am lost!
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

What does the error retrieval function of the PHP SQL extension you're using say is wrong with it ?
  • RedBMedia
  • Proficient
  • Proficient
  • User avatar
  • Posts: 315

Post 3+ Months Ago

its not returning any errors, just no content. When I run this query in phpMyAdmin it works great! but its not working in my script.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

When you run it in phpMyAdmin are you using a copy printed from within your application which includes values that are actually being used, or did you enter values you knew were going to be good ?
  • RedBMedia
  • Proficient
  • Proficient
  • User avatar
  • Posts: 315

Post 3+ Months Ago

problem solved! one of the varibles wasn't filled correctly in the same function that the sql call was being made! Thanks for your help anyways!
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

Certainly. :)

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 47 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.