Home Page   #c  #ruby-lang  #cisco  #mysql  #apache  #javascript  #java  #perl  #php  #openmoko   Wallpapers Girl
Reliable $1 Web Hosting by 3iX

Channels


#mysql

21 October 2007


Total 22 pages. You are browsing page 4/22.

First :: Prev :: [...] [2] [3] [4] [5] [6] [...] :: Next :: Last

00:54 <****> sorry
00:54 <****> AS OS ROOT USER TOO
00:54 <****> Right. mysqld
00:54 <****> hey im trying to catch the error that sql displays when i try to insert data into my table and theres a duplicate, i have it set to no duplicates, i know i need to use mysql_errno but am not really sure where to use that, can someone help me figure it out please?
00:54 <****> so my problem is? :o
00:54 <****> Manacit: mainly you didn't give us an error
00:55 <****> in that case
00:55 <****> /* SQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Condition, WootTime, Category, Shipping) VALUES(`Targus 90 Watt Universal Notebo' at line 1 */
00:55 <****> take WootTime out and change it to Date :\
00:55 <****> this is the lsof output: http://pastebin.com/m7265ac6b
00:55 <****> Manacit: i'm guessing Condition is a reserved word
00:55 <****> ooh, i never thought of that one
00:56 <****> and here is this error: http://pastebin.com/mbc8f910
00:56 <****> !man reserved words
00:56 <****> (Treatment of Reserved Words in MySQL) : http://dev.mysql.com/doc/mysql/en/reserved-words.html
00:56 <****> sivik_: The lsof output isn't correct. We probably need additional options to show the correct detail.
00:56 <****> Thanks a bunch, I NEVER would have thought of that one :\
00:57 <****> yeah, it didn't output anything, well, i need to go shower and get ready for my date
00:57 <****> i will work on this later
00:57 <****> sivik: I don't know what that error is. Which program crashed??
00:57 <****> Xgc: it is producing stack traces now
00:57 <****> mysqld --user=mysql
00:58 <****> Not a good sign,
00:58 <****> haha
00:58 <****> yes i know
00:58 <****> reinstall time
00:58 <****> for mysql or the os?
00:58 <****> sivik: Is this a GA build from mysql.com?
00:58 <****> well i'd try mysql first
00:59 <****> i think it's the ubuntu apt rep
00:59 <****> o
00:59 <****> i'm uninstalling it and then i will reinstall
00:59 <****> sivik: Good idea.
00:59 <****> working on it
00:59 <****> or get ready for your date ;)
00:59 <****> But I'd probably grab a build from mysql, not ubuntu.
00:59 <****> nils-, lol
00:59 <****> !man date and time f
00:59 <****> (Date and Time Functions) : http://dev.mysql.com/doc/mysql/en/date-and-time-functions.html
00:59 <****> maybe that helps you ;)
01:01 <****> !woman date
01:02 <****> chadmaynard: (Dating time) : Though shall not spend weekends on IRC
01:02 <****> heh
01:03 <****> http://pastebin.com/m39245a97
01:04 <****> well then
01:05 <****> I like those systems that do everything for you. It's just so clean and tidy.
01:06 <****> and impossible to fix when it doesn't work
01:06 * Xgc never uses them.
01:06 <****> It's too much work to maintain those automated systems.
01:07 <****> Automated systems make really nasty automatic messes.
01:09 <****> that guy was giving me a headache anyway
01:11 <****> hehe
01:28 <****> hey guys
01:28 <****> why would you ever want to do count() on anything but *
01:28 <****> like count(f.foo_id)
01:29 <****> on a multi table query
01:29 <****> To avoid counting rows in the result set where that value is NULL.
01:29 <****> I think that's the only difference.
01:30 <****> i see
01:30 <****> hmm
01:30 <****> demio, yes. count(*) counts rows, count(expression) counts rows there expression is not null
01:30 <****> demio, remember expression does not have to be a column
01:31 <****> yea
01:41 <****> peeps
01:41 <****> SELECT DISTINCT(ip) FROM stat_blox ORDER BY id DESC LIMIT 20 "
01:42 <****> how cna imake thi o sect a field caled visithile keping ip disitinct
01:42 <****> SELECT DISTINCT(ip),visit FROM stat_blox ORDER BY id DESC LIMIT 20 " it tried this ip was no longer istinct, is there another way
01:42 <****> mattcrane: group by ip
01:43 <****> thanks
01:45 <****> mattcrane, this is an abomination
01:47 <****> what is gnari
01:49 <****> i asked for help, with something i didn't know how to do, chadmaynard helped me and i thanked him. What's wrong with that?
01:56 <****> greetings
01:57 <****> i am trying to set up replication. i stopped the master, configured it to be a master, took a mysqldump of it whilst the tables were locked once i'd restarted the server, and i forgot to take a note of the log position on the master status
01:57 <****> just spent 6 hours transferring the dump from the master to the slave
01:57 <****> mattcrane, i was talking about your query. in particular doing distinct or group by a column, and order by another
01:58 <****> i'm just wondering how i can set up the replication without knowing the log offset that the dump was taken at?
01:58 <****> i don't particularly want to do another 6 hour transfer ;)
02:01 <****> i'm just going to have to transfer a fresh backup aren't i :(
02:02 <****> mattcrane: The problem is visit is not well defined (not an effective aggregate in any sense) in the context of GROUP BY ip.
02:03 <****> visit is a datetime
02:04 <****> mattcrane: Correct. It's pretty much useless in this query. You can't depend on the value returned, other than to admit it is one of the datetime values of the group.
02:04 <****> oh.... so by me grouping by ip better to order by visit|
02:04 <****> you may want SELECT ip, max(visit) FROM table group by ip
02:04 <****> mattcrane: chadmaynard suggests a proper solution.
02:05 <****> if i want to limit on that, that would be fine?
02:05 <****> mattcrane: Limit?
02:06 <****> you may want SELECT ip, max(visit) FROM table group by ip LIMIT 20
02:06 <****> mattcrane: as in HAVING MAX(visit) < NOW() ? Sure.
02:07 <****> mattcrane: The limit has nothing to do with the issue I raised over visit.
02:07 <****> ahh a little confoosed, i want to show the latest visting countries
02:07 <****> mattcrane: You probably shouldn't limit without some explicit ordering.
02:08 <****> mattcrane: These are completely independent ussues.
02:08 <****> issues.
02:09 <****> mattcrane: you can alias max() and then order by that.
02:15 <****> ip(for country)thankyou guys
02:15 <****> all done
02:15 <****> appreciate the help
02:20 <****> the w.sid = NULL it coming up false even when true. I don't really understand why...anyone see something wrong? http://pastebin.com/d56f1fd9
02:20 <****> flexo" WHERE w.sid IS NULL


Total 22 pages. You are browsing page 4/22.

First :: Prev :: [...] [2] [3] [4] [5] [6] [...] :: Next :: Last


Tutti i nuovi CAP Italiani. Come ottenere il database completo