IT Community - Software Programming, Web Development and Technical Support

creating a post made since last visit problem

This is a discussion on creating a post made since last visit problem within the PHP Programming forums, part of the Web Development category; hi, on a news program i made i want to allow my members to see what new articles were made ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > PHP Programming

Register FAQ Members List Calendar Mark Forums Read
  #1  
Old 02-09-2009, 10:15 AM
lukevrn lukevrn is offline
D-Web Trainee
 
Join Date: Feb 2009
Posts: 3
lukevrn is on a distinguished road
Default creating a post made since last visit problem

hi,

on a news program i made i want to allow my members to see what new articles were made since they last visited the site. pretty much what i want to do is exactly how phpbb and other bbs programs do.

now looking at them i applied the same method but it doesn't seem to work.

first off i added a column last_visit which would have the last time they visited the site(in time())

then i made it do a search with the following query:

Code : SELECT * FROM metal_posts WHERE Date>='$last_visit'

now doing it that displayed 0 results every time no matter what. changed >= to <= just displayed all of the news articles.

so question is, what am i doing wrong?

to let you know all the dates on my program are in time() format so format issue isn't the problem here.

thanks
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 04-07-2009, 10:34 PM
maneetpuri maneetpuri is offline
D-Web Trainee
 
Join Date: Feb 2009
Posts: 7
maneetpuri is on a distinguished road
Default Re: creating a post made since last visit problem

Hi,

Try to use date_format function of MySQL in your query, what you have to do is apply this function to both the dates being compared so that MySQL can apply the matching filter and show you the records.

Also make sure that last_visit is also a complete time stamp i.e. date and time and not just time.

Hope this helps.

Cheers,

Maneet
__________________
Maneet Puri
Web Design Company / Data Processing Services
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
I made a terrible mistake rony321 Computer Hardware 0 01-10-2009 11:54 AM
Dental Healthcare Visit to Kerala BonyAmi The Lounge 0 12-18-2007 11:11 PM
Any correlation between spiders visit &a montyauto PHP Programming 0 04-07-2007 09:28 PM
Visit URL -> login -> extract link oyu2o PHP Programming 0 03-10-2007 08:42 AM
Worst SEO mistakes you've made? spid4r Search Engine Optimization 0 03-08-2007 11:34 PM


All times are GMT -7. The time now is 12:54 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.
Our Partners
One Way Moving Companies | Stamford Dentist | Euro Millions Lottery | Home Loans| Furniture

SEO by vBSEO 3.0.0