Jump to content

[SOLVED] Setting up a mysql query help


graham23s

Recommended Posts

Hi Guys,

 

i have this query to select disctinct, user id's from mysql, but i have now realised i also need the `date` field assosciated with those fields:

 

<?php
$queryvisitors = "SELECT DISTINCT `visitorsid` FROM `usersvisitors` WHERE `usersid`='$var_loggedinuserid' ORDER BY `date` DESC LIMIT 5";
?>

 

is there away i can select the `date` field in the same query as distinct at all?

 

thanks guys

 

Graham

Link to comment
https://forums.phpfreaks.com/topic/79808-solved-setting-up-a-mysql-query-help/
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.