Thursday, 15 January 2015

php - Query Multiple Conditions -



php - Query Multiple Conditions -

i keeping track of few things on site , im using lot of queries because need different conidtions

for example

$example = mysql_query("select column table column = 'value1'"); $example_row = mysql_num_rows($example); $example1 = mysql_query("select column table column = 'value2'"); $example_row1 = mysql_num_rows($example1);

and on, value different im having problem finding way create in 1 query still different rows count different values, possible?

i test row see if matches value

if ($row == 'value'){ }

multiple times still seems bad

use in()

select column table column in('value1', 'value2');

php mysql sql database

No comments:

Post a Comment