Garayed.com  

Go Back   Garayed.com > mySQL
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-16-2007, 02:10 PM
rebeccatre@gmail.com
 
Posts: n/a
Default mysql question

+------------+-----------------+----------+---------------+
| news_id | heading | body | data |
+------------+-----------------+----------+---------------+
| 1 | HeadingA | BodyA | somedata |
+------------+-----------------+----------+---------------+
| 2 | HeadingB | BodyB | somedata |
+------------+-----------------+----------+---------------+


Hello, I need some help with this. It would be greatly appreciated.

Please show me how to construct a MYSQL query, that selects all (*)
from the row where 'heading' = 'HeadingA' AND 'body' = 'BodyA'.

so basically I am checking against two WHERE conditions (heading and
body).... I am not sure how to do that.

Thank you so much!

Rebecca

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-16-2007, 02:17 PM
ZeldorBlat
 
Posts: n/a
Default Re: mysql question

On Jul 16, 10:10 am, rebecca...@gmail.com wrote:
> +------------+-----------------+----------+---------------+
> | news_id | heading | body | data |
> +------------+-----------------+----------+---------------+
> | 1 | HeadingA | BodyA | somedata |
> +------------+-----------------+----------+---------------+
> | 2 | HeadingB | BodyB | somedata |
> +------------+-----------------+----------+---------------+
>
> Hello, I need some help with this. It would be greatly appreciated.
>
> Please show me how to construct a MYSQL query, that selects all (*)
> from the row where 'heading' = 'HeadingA' AND 'body' = 'BodyA'.
>
> so basically I am checking against two WHERE conditions (heading and
> body).... I am not sure how to do that.
>
> Thank you so much!
>
> Rebecca


You ask for exactly what you asked for:

select *
from news
where heading = 'HeadingA'
and body = 'BodyA'

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 02:17 AM.




LinkBacks Enabled by vBSEO 3.0.0 © 2007, Crawlability, Inc.