||[Mar. 8th, 2004|12:50 am]
The Question Club
Alright. I'm wracking my brain trying to think of the solution to this. I know it must be simple, which is why I can't think of it. This is not the only place I've asked.
I'm writing a script. I want to display the contents of a table dependant upon the value of one of the columns.
Let's say I have a row that has the columns "Category", "Name," "Email" and "URL" -- in this example row, the values are like this - Category: Pointless, Name: Me, Email: firstname.lastname@example.org, URL: http://here.com. There are other rows like this, though they have varying values. I want to display the contents of the rows that have "Pointless" as the category.
$query = 'SELECT * FROM ' . $db_table . ' WHERE ' . $site_sort . ' = ' . $category . ' ORDER BY title ASC';
In varying ways, and to no avail. I always get this result "Error executing query: Unknown column 'personal' in 'where clause'"
I figured it out -- many thank-yous to rivv