![]() |
| |||
| +------------+-----------------+----------+---------------+ | 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 |
| |||
| 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' |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |