Alright, I've been trying to work this query out for about an hour now and it's starting to p**s me off...so, after trying to figure it out on my own, I hope the YA experts can help me out...
I'm trying to do a simple select query using PHP...it goes something like this:
// In this instance, the variables are..
$from = 0;
$archive = 5;
// The query..
$query = "SELECT * FROM table WHERE field1 = 'value' AND field2 = 'value' ORDER BY field3 DESC LIMIT " . $from . ", " . $archive . "";
$content = $db->query($query);
I don't understand it, the query works fine if I remove the limit from the sql statement. However, I am trying to limit the results so I can put some paging in there...please help!!
Tags: