select statemnt

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
ridwan
Forum Commoner
Posts: 55
Joined: Thu Aug 22, 2002 3:15 am

select statemnt

Post by ridwan »

I am trying to figure out a select statement which will get info from two colums, this is what i mean :

SELECT * FROM table1 WHERE column1 = 'stuff' AND column2 = 'morestuff'

It shouldn't be 2 hard but I've looked all over and can't seem to find anything about it

thanks all
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Is that statement not working for you - I can't see anything wrong with it? What exactly are you trying to do and what problems are you having doing it?

Mac
ridwan
Forum Commoner
Posts: 55
Joined: Thu Aug 22, 2002 3:15 am

it just doesn't show any info

Post by ridwan »

i have these 2 columns in my table one is a celled section and the other subsection so my select statement works by seeing whether the necessary value is in both columns and if it is, it will display the info in one of the other columns.

if you need me to give you the code just let me know and I will, it's only about ten lines in all.

thanks
Post Reply