mysql question

This is a discussion on mysql question within the MySQL Database forums, part of the Database Forums category; +------------+-----------------+----------+---------------+ | news_id | heading | body | data | +------------+-----------------+----------+---------------+ | 1 | HeadingA | BodyA | somedata | +------------+-----------------+----------+---------------+ | 2 | HeadingB | BodyB | somedata | +------------+-----------------+----------+---------------+ Hello, I need some help with this. It ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-16-2007
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

Reply With Quote
  #2 (permalink)  
Old 07-16-2007
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'

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

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



All times are GMT +1. The time now is 06:06 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0