Page 1 of 1

Syntax Question

Posted: Tue May 02, 2006 8:57 pm
by psurrena
Can someone help me with this?

Code: Select all

$query = "SELECT * FROM workshop WHERE type = Workshop ORDER BY id  ASC LIMIT $offset, $rowsPerPage";
The problem is "WHERE type = Workshop". I get the error "Error : Unknown column 'Workshop' in 'where clause'". The row is called "type" and the value is "workshop".

Thanks

Re: Syntax Question

Posted: Tue May 02, 2006 8:59 pm
by programmermatt
I think you want:

Code: Select all

$query = "SELECT * FROM workshop WHERE type = 'Workshop' ORDER BY id  ASC LIMIT $offset, $rowsPerPage";

Posted: Tue May 02, 2006 9:01 pm
by psurrena
Thanks. Works perfect!