Hello guys!

"SELECT * FROM $tableName WHERE cata != 'abc' AND ORDER BY times desc LIMIT $start, $limit";

Is there any reason as to why this block is not working? What is the rule for formating such queries?

Thanks.

Hello guys!

"SELECT * FROM $tableName WHERE cata != 'abc' AND ORDER BY times desc LIMIT $start, $limit";

Is there any reason as to why this block is not working? What is the rule for formatting such queries?

Thanks.

Edit: Should inform that I want to retrieve all the items of a database, 'cept for those who has 'abc' in their cata(catagory) item. Then order it after date.

All that work, 'cept for the "Where cata != 'abc'" implementation.

$sql = "SELECT * FROM $tableName WHERE cata <> 'abc' ORDER BY times DESC LIMIT $start, $limit";
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.