Jump to content


Photo

Simple query...


  • Please log in to reply
3 replies to this topic

#1 rcharris

rcharris
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 20 August 2006 - 08:13 PM

Hi all, apologies for the possible n00bness of this post, but I'm self taugh, and i've never done this query before

I have a query running at the moment which is

SELECT title, id, type, description, updated FROM portfolio WHERE type = \'Web Design and Build\' ORDER BY id DESC


but what I want the query to do is, yes, still retrieve that type, but only rows with a type of Web Design and Build, and "Main Page"

Any ideas?

Muchly grateful in advance :),

rcharris

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 20 August 2006 - 08:20 PM

SELECT title, id, type, description, updated FROM portfolio WHERE type IN('Web Design and Build','Main Page') ORDER BY id DESC

Legend has it that reading the manual never killed anyone.
My site

#3 rcharris

rcharris
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 20 August 2006 - 08:22 PM

Hi there,

Seem to get a

Parse error: parse error, unexpected T_STRING in \path\i\do\not\wanr\to\release\Web Design and Build.php on line 174

error and I cant see where!

#4 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 20 August 2006 - 11:26 PM

Probably a problem with mismatched ' and " quotes.  Better show us a dozen or so lines up to and including line 174  ...
Legend has it that reading the manual never killed anyone.
My site




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users