[thelist] Rookie SQL Question... got it
jsWalter
jsWalter at torres.ws
Sun Aug 17 01:53:21 CDT 2003
> -----Original Message-----
> From: thelist-bounces at lists.evolt.org
> [mailto:thelist-bounces at lists.evolt.org]On Behalf Of jsWalter
> Sent: Sunday, August 17, 2003 1:29 AM
> To: Thelist at Lists. Evolt. Org
> Subject: [thelist] Rookie SQL Question...
<snip>
> $strSql = 'SELECT * ';
> $strSql .= ' FROM menu_items, menu_type ';
> $strSql .= ' WHERE m_id = m_id' ;
> $strSql .= ' WHERE menu_items.m_type = menu_type.m_type ';
> $strSql .= ' ORDER BY menu_items.m_type, menu_items.m_sort ';
I made a rookie mistake!
Should read...
$strSql = 'SELECT * ';
$strSql .= ' FROM menu_items, menu_type ';
$strSql .= ' WHERE m_id = m_id' ;
$strSql .= ' AND menu_items.m_type = menu_type.m_type ';
$strSql .= ' ORDER BY menu_items.m_type, menu_items.m_sort ';
That second WHERE in the fifth line. Should have been an AND.
Thanks anyway.
Walter
More information about the thelist
mailing list