Jump to content

[SOLVED] MySql Select WHERE something & something else.


Michdd

Recommended Posts

 

Trie this from a database but using 2 tables and field_names.

<?php

// database connection...

$sql="select * from table1 as a,table2 as b where a.what_ever='true' and b.what_ever='true'";

$res=mysql_query($sql)or die(mysql_error());

while($data=mysql_fetch_assoc($res)){

echo $data['what_ever'];
}

?>

 

Trie this from a database but using 2 tables and field_names.

<?php

// database connection...

$sql="select * from table1 as a,table2 as b where a.what_ever='true' and b.what_ever='true'";

$res=mysql_query($sql)or die(mysql_error());

while($data=mysql_fetch_assoc($res)){

echo $data['what_ever'];
}

?>

I want to do something that will select something from the DB where a name='something' and somethingelse>'29'

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.