Multiple where
Posted: Wed Mar 16, 2005 11:58 pm
how do you specify 2 where criteria when selecting from mySQL?
Cheers,
Simon
Cheers,
Simon
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
// $this->_where : property
// $where : optional parameter
// $q1: the complete query
if (!empty($this->_where))
{
if (!empty($where))
{
$where = "($where) AND ($this->_where)";
}
else
{
$where = $this->_where;
}
}
if (!empty($where))
{
$q1 .= " WHERE $where";
}