@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6



Comments:

<0> hold on for a minute
<0> i'm doing other stuff
<0> i'll spoon feed you in a while
<1> jon.i got it
<1> http://dev.mysql.com/doc/refman/5.0/en/date-calculations.html
<1> here
<1> but it is used for YEARS
<1> i need to do it for minutes
<2> try changing the interval to minutes
<1> how?
<2> if i remembered i'd probably of told you by now
<1> i need to see that the date entry is of TODAY and that it is 4 minutes old
<1> please
<2> if anything you just subtract 60 seconds from a timestamp
<2> er
<2> 4*60



<1> timestamp?
<2> ..
<1> can u tell me the SELECT name, birth, CURDATE(),
<1> -> (YEAR(CURDATE())-YEAR(birth))
<1> -> - (RIGHT(CURDATE(),5)<RIGHT(birth,5))
<1> -> AS age
<1> -> FROM pet;
<1> sorry
<1> i didnt mean to flood
<1> accident
<0> Here, YEAR() pulls out the year part of a date
<1> i see
<0> pulling out the minute part wont tell you no. of minutes
<1> then whats the work around?
<1> jon, can you tell me the uery?
<1> please...
<1> what do i do for minutes?
<1> if minute() doesnt pull out minutes
<1> and even if it does.....i will still have to check if its today's entry and of the same hour as now
<1> sir?
<1> ?
<0> sir can you like wait for a while?
<0> you'll get solution to your anser
<1> ok....thanks
<1> i tried this
<1> $Nowd = "2004-07-17-11-20-09";
<1> $result = mysql_query("SELECT * FROM members WHERE TIMEDIFF(member_timed, $Nowd) >= 2");
<1> 2 = minute
<1> u can replace it with 4
<2> wow
<2> http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
<2> and you read that?
<1> oh.....and i am storing the values in fields which are VARCHAR(30)
<2> idiot
<1> should it be a problem?
<2> that's one problem ;)
<2> maybe
<1> :(
<1> MAYBE?
<2> read about date_add
<2> and make your date/time fields .. well... date/time fields
<1> can u just tell me the query pleasE?
<1> im dying of searching
<2> dude
<2> just read about date_add
<2> on that page i just pasted
<1> ok
<1> ;|
<2> Date arithmetic also can be performed using INTERVAL together with the + or - operator:
<2> date + INTERVAL expr unit
<2> date - INTERVAL expr unit
<1> http://www.phpfreaks.com/forums/index.php?action=profile;u=34224;sa=showPosts
<1> can i use UNIX_TIMESTAMP
<1> will it work on windows server too?
<2> yeah but just make it a datetime field dude
<2> you're making it waaaay too hard in your head i think
<2> all you need is a datetime field
<1> im complex :)
<1> ok
<3> ok im back



<3> i used Now()
<3> but it says
<3> "Call to undefined function now()"
<2> SELECT NOW(); returns that?
<3> i tried
<3> echo Now();
<2> in SQL?
<4> date(format)
<3> no php
<3> jon
<2> why are you trying to use SQL in PHP
<3> can u please copy paste the URL i typed here as mbk?
<4> date('h:i m/d/y');
<3> can u please copy paste the URL i typed here as mbk? i lost it
<3> it has the info
<2> (sat 12:04:07p) [mbk] http://www.phpfreaks.com/forums/index.php?action=profile;u=34224;sa=showPosts
<2> this one?
<3> thanks
<2> poor guy
<2> he's all confused
<3> why am i trying to use sl in php?
<3> should i answer that?
<1> timediff should work on varchar(30) too
<2> you can't use SQL statements in PHP without using the provided functions and connectiong to the DB... i trust you know that
<1> yeah
<1> i know
<1> :)
<1> $query="SELECT * FROM Users WHERE UNIX_TIMESTAMP(LastActive) > UNIX_TIMESTAMP(NOW()) - 300";
<1> it is for 5 minutes
<1> i got it form those forums
<2> so you figured it out
<2> even though it's a lot easier to just use the correct datatype n such...
<1> NOW(), i didnt try it but isnt it acting here as a php function?
<2> no
<1> sl function?
<2> SQL, right.. that entire line is an SQL statement in a PHP variable
<2> i thought you knew this ;)
<1> i know
<1> my "CUE" key isnt working thats why i can only type "SL" not S"cue"L
<2> ah
<4> that ****s
<1> what is the TIMESTAMP function for?
<1> and i thought NOW() returns the current time/date in sl
<1> but this uery denies it
<1> $query="UPDATE Users SET LastActive=CURRENT_TIMESTAMP(NOW()) WHERE Username='$_SESSION['Username']'";
<1> here he is usinf
<1> *using current_timestamp
<1> and when selecting he uses unix_timestamp
<5> uh. are you retarded?
<2> yes
<1> ?
<6> lewl
<2> he's just trying to subtract minutes from a time... and just can't seem to grasp it.. and i give up
<5> current_timestamp(NOW()) lol
<1> ?
<1> im newbie
<1> i admit im lame
<1> but i need serious help regarding the uery
<2> you just need to slow down and read more
<5> being a newbie has absolutely nothing to do with that
<2> you've been given serious help
<2> as serious as i get, anyways.. i've told you the manual page and even pasted the part you need to read, and told you what type of field to use
<2> you come back with some other ****
<2> whatever.
<1> evulish_ just made fun of the timestamp thing
<1> is it wrong?
<5> god. just read it
<2> hehe
<5> it doesn't make any ****ing sense
<5> current_timestamp(now())
<2> sounds like current_timestamp displays the current time's timestamp
<1> what is TIMESTAMP?
<2> lol
<5> give up


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #php
or
Go to some related logs:

#chat-world
WhiteFlag.mp3
#allnitecafe
#india
eanglish chat
#chat-world
#photoshop
#java
#india
plastic bed sublime video



Home  |  disclaimer  |  contact  |  submit quotes