Re: Pulling Certain Data

From: Date: Tue, 06 Apr 2004 19:49:59 +0000
Subject: Re: Pulling Certain Data
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-182534@lists.php.net to get a copy of this message
From: "Jason T. Davidson" <chief@zmpartcc.com> > I am a first time databaser and am having trouble pulling information from a > database to display on a site. Not every entry is supposed to show up on > the web page, but does so. I have tried IF statements without any help. > Here is what I have so far: > > $r1="SELECT * FROM $main_tbl"; You need a WHERE clause to indicate any conditions that selected rows must satisfy http://www.mysql.com/doc/en/SELECT.html SELECT * FROM $main_tbl WHERE code = 'a' OR code = 'b' OR something > 1 for example. ---John Holmes...

« previous php.general (#182534) next »