PDA

View Full Version : excluding info in query


Lionel
12-17-2005, 09:04 PM
I am doing a query and would like to exclude all titles starting with 2.

how would I go about it?

select * from whatever where title does not start with '2'

thanks

sabret00the
12-17-2005, 11:39 PM
try

SELECT * FROM table WHERE column NOT LIKE '2%'

Lionel
12-18-2005, 01:39 AM
Thanks. I couldn't get it from the calendar. So I am trying to get it another way

if ($eventinfo['calendarid']==6 AND $eventinfo[title]!='???????????')

akanevsky
12-18-2005, 01:42 AM
if ($eventinfo['calendarid']==6 AND $eventinfo['title']{0} != 2)

Lionel
12-18-2005, 01:46 AM
I get a parse error both ways

never mind, it works. I had an extra ")" in there.

thanks!!

akanevsky
12-18-2005, 01:48 AM
What type of parse error?

Lionel
12-18-2005, 01:48 AM
never mind, I edited my post, thanks

akanevsky
12-18-2005, 01:48 AM
No problem :)