How do you write "Select (all) From (table) Where posting=$posting except this posting? (Mysql)
Posted
by ggfan
on Stack Overflow
See other posts from Stack Overflow
or by ggfan
Published on 2010-04-10T03:46:58Z
Indexed on
2010/04/10
3:53 UTC
Read the original article
Hit count: 395
I want to write a Mysql statement that selects all from a table(posting) where title is like $title except for the title of $title. Basically I want to display all related posting of a certain posting. I want the query to select all the postings in the table that has the title name in the title and detail. But I don't want the posting to display in the related postings.
$query="Select * From posting Where title,detail, like %$title% except $title";
how do I write the except part?
© Stack Overflow or respective owner