Jump to content

Fetching from a specific date and on.


catri3l

Recommended Posts

Hey. Couple of weeks ago i got help on a code which worked great! (thanks)

 

The code was to fetch a friends action feed from the db. However ive noticed that when a buddy becomes friends with another person on the site, all the actions from that person are added to the feed, making the list confusing. Because it displays and mixes all the actions of a new user with the existing ones

here is the code:

 

<?php

 

$fetch_feed = sql_query("SELECT * FROM joovili_buddies jb

JOIN joovili_buddy_feed jbf ON (jb.buddy_buddy = jbf.feed_username)

WHERE jb.buddy_username = '{$_COOKIE['session_username']}' AND jb.buddy_status='1'

ORDER BY jbf.id DESC LIMIT 15");

while ($feed = mysql_fetch_array($fetch_feed)){

 

?>

 

There is a buddy_date (which i added to the data base) and it shows the date those two person became friends. Is it possible to display the feed from a person starting from the date they became friends?

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/106703-fetching-from-a-specific-date-and-on/
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.