Jump to content


Photo

Selecting from a table then a record


  • Please log in to reply
2 replies to this topic

#1 davieboy

davieboy
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 28 June 2003 - 03:07 PM

Previous problem sorted

I want to select data depending on two things

so i select from the db (clients) then i want to display the data in the area (area) and then select the business.

The area andbusiness are bth tables in the clients dataabse

Can anyone help?

is this is

[php:1:4474af2f70]
SELECT * FROM clients WHERE business = \'self\', WHERE area = \'south ayrshire\'\"
[/php:1:4474af2f70]

#2 Nairb

Nairb
  • Members
  • PipPip
  • Member
  • 18 posts
  • LocationCanada

Posted 28 June 2003 - 08:28 PM

Just curious...
Shouldn\'t it be:

[php:1:fe23b0cc40]
SELECT * FROM clients WHERE business = \'self\' AND area = \'south ayrshire\'\"
[/php:1:fe23b0cc40]

#3 davieboy

davieboy
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 28 June 2003 - 08:30 PM

thats where i went wrong

I used and in lower case

Cheers m8




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users