Welcome Guest, Not a member yet? Register   Sign In
mySQL problem
#1

[eluser]JunlieF[/eluser]
Pls. correct me I need a little help here...


$sql = "SELECT * FROM deparments, prints WHERE 'id{$dept}' AND 'date_printed BETWEEN '{$from}' AND '{$to}'";
#2

[eluser]solid9[/eluser]
Why are you using the traditional way?
Why not use Active Records?

Try executing and testing that inside PHPMyAdmin,
So when you see an error it's easy for you to fix it.
#3

[eluser]rochellecanale[/eluser]
What exactly you want to do? And what's the error?
#4

[eluser]fasfad[/eluser]
If you run that query with $this->db->query($sql);

Use $this->db->last_query(); To get the generated sql and check that or put it in phpmyadmin to check whats wrong with it.




Theme © iAndrew 2016 - Forum software by © MyBB