| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Comments:
<0> and once i get basic things down like walking and chatting, i'll gather a large group of people to test load <0> i love javascript to pieces, my c++ learning has been paused because javascript is just so much more rewarding <1> can you walk and chat at the same time? <1> :) <0> i don't see why not <2> ur2leet4me =/ <0> umm... <0> whatever. <0> so eh with timestamp, what's the easiest way to just kinda poke it to make it do its thing, you know, update the time in itself? <1> well a TIMESTAMP does that whenever the row is updated <1> a DATETIME field has to be manually set <0> UPDATE users SET timestamp=NOW() ? <3> I believe NOW() returns a formatted date. <3> UNIX_TIMESTAMP()
<3> !m UNIX_TIMESTAMP() <4> Incorrect usage. See 'help m' <3> !m UNIX_TIMESTAMP <4> Incorrect usage. See 'help m' <1> !man date time functions <4> (Date and Time Functions) : http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html <3> Ah <3> "Returns the current date and time as a value in 'YYYY-MM-DD HH:MM:SS' or YYYYMMDDHHMMSS format, depending on whether the function is used in a string or numeric context." <0> is there an easier way to just poke the row, if i have nothing to update? <2> [20:55] <1> well a TIMESTAMP does that whenever the row is updated <3> !man TIMESTAMP <4> (Overview of Date and Time Types) : http://dev.mysql.com/doc/mysql/en/Date_and_time_type_overview.html <0> i know but i have nothing to update! <0> how do i do a blank update? <0> UPDATE tablename WHERE username='foo' -> would that update all timestamps in the row of 'foo'? <5>s in SQL-99 format <1> dunno, UPDATE is smart enough to not update rows that don't change <0> i just realized, i can test it easily :) <2> why would you ever want to update a row with a timestamp if you werent changing the row any other way <6> Last time a user logged in? <2> if you want to use that use a datetime <6> DATETIME is bigger than TIMESTAMP. <2> s/use/do <2> piddly winks, he doesnt know or care about that <0> no, last time an user pinged <6> Maybe he should... <0> with javascript i can't guarantee that a user won't randomly leave the page without logging out, so i have to have the user repeatedly ping <0> not to mention it has to ping repeatedly anyway, because the users have to constantly update the nearby users <6> haha <2> .. <2> god i love this channel <0> anyway how do i do that? i want to like... tap, poke, peek, something! at the row to update the "lastpinged" timestamp value... <6> UPDATE table SET timestamp_col = NOW() WHERE id = x; <6> BTW, The TIMESTAMP column type changed in 4.1. <6> If you were the version guy... <2> he is <0> i have 4.1 <6> Oh. I thought you were on 4.0-nt... <0> oh yea <0> lol <0> 4.0.17-nt... <0> idk, it doesn't matter right now, i have all my questions answered at the moment <0> ok, is NOW() a numeric value in such a case as updating a timestamp, and if so, can i do something like "UPDATE table SET timestamp_col = NOW()-9999 WHERE id=x;" to set the timestamp to a past time? <0> actually, never mind <0> that question isn't necessary :) <6> You should know the answer regardless... <6> What does "SELECT NOW();" Give you? <6> Also, what does "SELECT NOW()-9999;" give you? <0> k, so it works <0> i figured it would <6> What works? <0> man i need to get used to the fact that mysql is actually easy to test <0> SELECT NOW()-9999; <6> hehe <6> That probably does not work as expected... <0> yes it does, it returns a valid date number that is 9999 seconds ago <7> is there a way to do a mysql insert and have it return the value it set the id column to <8> can anyone see the problem with this line: cat_dest = (select CONCAT(cat_dest, pset, dest, ':')); ? <7> ? <8> this is within a stored procedure those names above are variables
<0> yea sorry guys but i don't know enough about mysql to answer either of your questions <7> hmm <7> i need a mysql guru <6> atapi, It does already. Look at the mysql_insert_id() function <6> !man last insert id <4> (How to Get the Unique ID for the Last Inserted Row) : http://dev.mysql.com/doc/mysql/en/Getting_unique_ID.html <7> thats magic <9> Ricky26269 - to prove it doesn't work like that, try NOW() - 365.25*86400 (~1 year ago) <6> Ricky28269, Actually, it doesn't return what you expected. <6> mysql> SELECT NOW(), NOW()+0, NOW()-100, (NOW()-INTERVAL 100 SECOND)+0, NOW()-INTERVAL 100 SECOND; <6> +---------------------+----------------+----------------+-------------------------------+---------------------------+ <6> | NOW() | NOW()+0 | NOW()-100 | (NOW()-INTERVAL 100 SECOND)+0 | NOW()-INTERVAL 100 SECOND | <6> +---------------------+----------------+----------------+-------------------------------+---------------------------+ <6> | 2006-04-10 18:19:08 | 20060410181908 | 20060410181808 | 20060410181728 | 2006-04-10 18:17:28 | <6> +---------------------+----------------+----------------+-------------------------------+---------------------------+ <6> Took me way to long to figure out the proof. I'm a luser <9> you're being confused by a local linearity in a non-linear range :) <0> what's wrong with that output? <9> heh <10> what is timestamp() <0> magic@ <0> ! <0> a data type. <9> the 1729 is not 1,729 seconds <9> it's 17*60+29 seconds <6> Temp_I3ooI, TIMESTAMP() is a function that returns seconds since epoch <6> A UNIX_TIMESTAMP <9> and it's not at all what you want <6> Depends... :) <6> Depends who's asking :) <10> yeah but how can i convert it to say gmt -4 time/date ? <0> wheres a 1729? <6> Temp_I3ooI, Use NOW()? <10> i do want it <6> oh <10> so now(Field that is a timestamp) ? <6> Ricky28269, Do you see how it's wrong? <0> no <9> no, he doesn't <6> Temp_I3ooI, A TIMESTAMP field is something different. <9> the numeric version has all the number runtogether <9> it's not a number of seconds <0> ah, i get it now <9> that's a UNIX_TIMESTAMP() <10> i want to create a timestamp to show when a record was create but ina query i need that time converted <9> the last two digits will *never* be 61, for example <9> FROM_UNIXTIME() works <0> yes i get it now <6> Temp_I3ooI, What format do you want to create the timestamp in? In a normal date? Or seconds since 1/1/80? <9> or just use date <10> seconds since <6> Why? <0> so a timestamp value can be a UNIX_TIMESTAMP() ? <6> (just looking for a reason) <6> Ricky28269, No <6> Well, what context is TIMESTAMP in? <0> like UPDATE table SET timestamp_col=UNIX_TIMESTAMP() WHERE id=x; - would that work fine? <6> Try it :P <0> can't you just tell me? lol <0> great, straight 0s <1> I miss VMS times, units of 10ns since 1878 <6> Because I don't know off the top of my head what TIMESTAMP can take <0> GAH. <6> I'm thinking TIMESTAMP needs normal YYYY-MM-DD format <6> I don't use TIMESTAMP. :) <6> simonkaos, Oh, that was you? I could have sworn my cat did.. and boy is it BAD <6> Ricky28269, Use NOW() <6> !m Ricky28269 date column <0> but NOW() can't be subtracted from <4> Ricky28269: (Problems Using DATE Columns) : http://dev.mysql.com/doc/mysql/en/Using_DATE.html
Return to
#mysql or Go to some related
logs:
fedora +two sound cards phpMyAdmin - Error Cannot load session extension. Please check your PHP configur udev_make_node: mknod /dev/capi failed: Operation not permitted #math swiftfxp ubuntu Perl CPAN reconfig -Cisco #gentoo dos2unix debian sarge
Dynamicshell unable to open bitbake.conf
|
|