Jump to content

select distinct and attributes


puntapuisomos

Recommended Posts

I get three values after a distinct-query.

<?

$querydd = "Select distinct(smth) From offer WHERE whatever='2' Order By smth";

$resultdd = mysql_query($querydd);

while($smth = mysql_fetch_row($resultdd)) {

echo ("$smth[0]<br>");

}

?>

Let's say the echo gives this1, this2 and this3. Now I want to start another query in which "this1" must be put in a where-clause. How van I turn the this1, this2 and this3 into a $this1 $this2 and $this3?

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/98608-select-distinct-and-attributes/
Share on other sites

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.