Jump to content

yperevoznikov

New Members
  • Posts

    8
  • Joined

  • Last visited

About yperevoznikov

  • Birthday 03/12/1988

Contact Methods

  • Website URL
    http://yperevoznikov.com
  • ICQ
    458526704
  • Yahoo
    yperevoznikov

Profile Information

  • Gender
    Male
  • Location
    Russia

yperevoznikov's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. As Muddy_Funster said try JOIN of SQL and one loop, something like that: SELECT DISTINCT tm.* FROM my_friends tf JOIN messages tm ON tm.uid_fk = tf.user_id OR tm.uid_fk = tf.friend_id WHERE (tf.user_id = '$user_id' OR tf.friend_id = '$user_id') AND tf.status = '1' ORDER BY msg_id DESC LIMIT 10 this SQL query will return all messages that are related to current user and all his friends (first 10 of course)
  2. Hi buladex, That's very strange As I understand your condition is not working only if pass 12 hours sharp. Did you try to use `<=` `>=` instead `<` `>`? About your question: You may convert time to timestamp by UNIX_TIMESTAMP() as I said before or set timestamp as type of your field.
  3. Hi DarkPrince2005. Hmm.. That's very strange.. And it's code doesn't work? Can you try somethind like this: <script type="text/javascript"> function submitform() { //document.forms.tracks.submit(); document.getElementById("tracks").submit(); } </script> If this doesn't help too - show code that you receive in browser (View Page Source in FF for example). Thanks.
  4. Hi Longtone, Probably images just don't load to moment you get its dimensions. Can you get these dimensions by .bind("load", method) for your image. I think you use OOP and you need bind method, so you can find how to bind method of class in my blog http://bit.ly/9nWaGV if you wish. Thanks.
  5. Hi DarkPrince2005, Can you send html code of all page? Thanks.
  6. Hi Buladex I one of decisions you may try to convert time to timestamp and then compare time (by using UNIX_TIMESTAMP() function). Or you may try better solution - TIMESTAMPDIFF() function. Something like this: TIMESTAMPDIFF(HOUR, `your_time`, NOW()) < 12 or ... > 12 depending on what do you want check. Let me know it this is help you if not - post SQL script you used and examples from DB. Thanks.
  7. Hi kworld, you are absolutely right when you said that your type of variable is not array. You think that it's array because you can iterate it's in foreach but it's just object implemented iterator interface for instance - http://php.net/manual/en/class.iterator.php. I don't know for what exactly you need reversed array but try to create yourown array by array_unshift (to reverse it) or use xpath to get some element. cheers!
  8. @buladex Hi. Can you try this (Usage sql is more faster): $sql="SELECT * FROM $tbl_name WHERE DATE_ADD(NOW(), INTERVAL -12 HOUR) > `last_voted` and name='$myusername'";
×
×
  • 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.