RE: [PHP] MySQL SELECT question

From: Date: Thu, 16 Nov 2000 01:04:51 +0000
Subject: RE: [PHP] MySQL SELECT question
Groups: php.general 
Request: Send a blank email to php-general+get-25566@lists.php.net to get a copy of this message
> Can I use multiple where clauses in a select statement? > i.e. > > SELECT FROM table WHERE this = 'that'AND thishere = 'thatthere' Certainly! You'll need a space between the ' and the AND though. For complex WHERE statment you'll want to be introduced to your good friend, the bracket. :) > Is it possible to match, for example, only the month? > > SELECT * FROM table WHERE FORMAT_DATE( DATE, %m ) = '<value > from 1-12 here>' Hmmm, good one - not sure cos I've never done date stuff before. Maybe someone else can help you (I store unix timestamps). Jason

« previous php.general (#25566) next »