Hi,

Is it possible to put 2 where closes in your mysql select query. I need it because some people appear to be available twice, so I need to add from which team I want the information, so I need a where for the name and a where for team.

I tried with and but that doesn't seem to work. Does anyone know a workaround?

Grtz

use where once. separate with "and"


select * from teammembers where name = 'jack handy' and team = 'purple cobras'

use any mysql class to make it easy

commented: Didn't read the rules? Keep it on site. +0

use the 'and' keyword to add more conditional statements

Yeah 'and' will work e.g.

'SELECT * FROM team_members WHERE name = " ' . $variable . ' " AND team = " ' . $second_variable . ' "';
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.