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

Channels


#mysql

05 November 2007


Total 21 pages. You are browsing page 1/21.

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

--- Log opened Mon Nov 05 00:00:16 2007
00:03 <****> I have installed mysql-server 5.0.27 from ports on freebsd, but I was unable to start the server, only after rebooting freebsd is mysqld running and mysql app is available from the console. What did I miss?
00:04 <****> I am trying with: SELECT t1.car, t2.airline_name AS TE
00:04 <****> FROM carrental AS t1, airlines AS t2 WHERE t1.car LIKE 'av%' AND t2.airline_name LIKE 'av%'
00:04 <****> GROUP BY TE
00:04 <****> but it's giving me 2 fields as responses
00:05 <****> Well, you asked for two fields, didn't you?
00:06 <****> I would have thought that I should be able to start the mysql server after make installing, WITHOUT rebooting freebsd. But how?
00:06 <****> yes but I need to query 2 fields, but the anser in just one so I can present the results in just one column
00:07 <****> Can you have a table with two fields that are FKs to another table?
00:07 <****> I guess that doesn't make sense
00:08 <****> hi
00:08 <****> Ramblurr, why not?
00:09 <****> I want to do a Linklist with mysql, how to do it best? My Problem is actualy sorting sublinks to mainlinks
00:09 <****> Toerkeium, so remove the field you don't want to display from the field list? You don't need every field in the WHERE clause to be in the field list too.
00:09 <****> Simetrical, but they have different names (the fields, I mean).
00:09 <****> so I need to search for car companies, and airline companies
00:09 <****> mf_irc, run mysqld_safe as root? Use the various rc scripts? Those work for Linux.
00:10 <****> but present the result in just one column
00:10 <****> Toerkeium, oh, I see. You want a UNION.
00:10 <****> thanks Simetrical!
00:12 <****> Simetrical: ok I'll try. thx.
00:29 <****> hello, i was wondering if it is posible to get the autoinc number from the insert query?
00:30 <****> timholum: select last_insert_id();
00:30 <****> ok thanks :)
00:41 <****> mysql book it shows 19 * 32 kb which is 2560kb <-- how did they come up with 2560kb ?
00:45 <****> very carefully
00:45 <****> hows that
00:46 <****> if they told you ... your brain would explode
00:59 <****> mod_cure: your question lacks details... what is the 19? what is the 32 kb? what are they talking about?
01:07 <****> hey all . anyone know much about pear liveuser. ive visited site but having trouble geting started.
01:08 <****> Pear Liveuser? What's that?
01:08 <****> It's a gay flickr.
01:09 <****> http://pear.php.net/manual/en/introduction.php
01:10 <****> i was told that to make users and passwords for db, to research sessions and pear liveuser
01:22 <****> How can I change the codepage for the database, now its set for UTF-8 and that is wrong!
01:23 <****> How can I change the codepage for a database in phpmyadmin, now its set for UTF-8 and that is wrong
01:23 <****> kanzie: you can use alter table syntax to change the charset.
01:25 <****> ki77a77: something like: ALTER DATABASE myDB DEFAULT CHARACTER SET iso-8859-1
01:25 <****> kanzie: no
01:26 <****> kanzie: mysql allows granular charset settings, down to the table and column level. To change your server's default charset, you need to alter your my.cnf and restart. But that won't change what's already been created.
01:27 <****> http://dev.mysql.com/doc/refman/5.0/en/charset.html
01:30 <****> kanzie: there should be a setting to set the table charset every time you create a table
01:30 <****> hey there,
01:30 <****> I have a date column, how do I get what month appears both: more often and less often in that column?
01:30 <****> yeah, its set for swedish, this is really weird, somewhere along the line it stores it as UTF-8
01:31 <****> sqlnoob: less often than what
01:32 <****> kanzie: it's either latin1 with swedish collation, or utf-8. swedish collation is fine for english and many other western european languages, which is why it's the default
01:32 <****> arjenAU: well u have a lot of dates and I need to know which month appears the most and which month appears the least
01:32 <****> righty
01:32 <****> arjenAU: pluse mysql ab is based in ...
01:32 <****> plus*
01:32 <****> ki77a77: that too but the issue would still be the same. it makes sense regardless
01:33 <****> sqlnoob: SELECT MONTH(datecol) as mon,COUNT(MONTH(datecol)) AS moncnt FROM tbl GROUP BY mon ORDER BY datecol;
01:33 <****> order by moncnt sorry
01:33 <****> sqlnoob: select count(*), month(datecol) as my_month from table group by my_month order by my_month desc;
01:34 <****> yes
01:34 * arjenAU slaps himself for the silly count
01:35 <****> arjenAU: its latin1 with swedish collation
01:35 <****> arjenAU: so this means its my php that makes the inserts that is at fault here right?
01:35 <****> hahah well thanks, let me try that
01:35 <****> kanzie: what's theprob?
01:35 <****> sqlnoob: so you also want the year?
01:35 <****> kanzie: character set and collation is very complex. You have to account for the server, the client and the connection...
01:36 <****> kanzie: and you can change the charset in each individual insert query.
01:36 <****> That's why everyone needs to use Unicode! \o/
01:36 <****> kimseong: no, im ok.. only month
01:36 <****> kanzie: and your browser has to have the same setting for view. ;^)
01:38 <****> Simetrical: not really. lots of overhead on that.
01:38 <****> arjenAU, depends on implementation.
01:38 <****> ki77a77: hey ki7 so that'll return each month with the number of time it appears?
01:39 <****> yeah, it has all worked fine until now. I am familiar with the problems that can arise and been glad that I've been fine until now
01:39 <****> suddenly it seems to insert data as utf-8
01:51 <****> sqlnoob: tias (try it and see)
01:52 <****> ki77a77: I did it's giving me an error =/
01:52 <****> sqlnoob: show us the error
01:53 <****> SELECT count(*), MONTH(date) AS month_count FROM Listing GROUP BY month_count ORDER BY month_count DESC
01:53 <****> SQL0206N "MONTH_COUNT" is not valid in the context where it is used.
01:53 <****> sqlnoob: what is the data type of the column `date`?
01:54 <****> ki77a77: date
01:55 <****> sqlnoob: Move the alias (month_cnt) to the first field.
01:55 <****> sqlnoob: do 'select month(date) from Listing limit 1;' and tell me what it does.
01:55 <****> select count(*) month_count, ...
01:56 <****> ok let me see....
01:56 <****> lots of help ;^)
01:56 <****> sqlnoob: SELECT MONTH(date), COUNT(*) AS month_cnt FROM ... GROUP BY MONTH(date) ORDER BY month_cnt DESC;
01:57 <****> sqlnoob: You had the field aliases confused.
01:57 <****> Xgc: sorry, I confused him with incorrect syntax
01:57 <****> she*
01:58 <****> lol, never admit that on irc
01:59 <****> lol
02:00 <****> ok i got it working thanks a bunch
02:01 <****> good
02:02 <****> ah ah.. ok i get the listing.. is there anyway I can print the name of the month instead of the number? and to print only the 1st and last row?
02:02 <****> Xgc: better to alias the col then group by the alias. prevents duplication of the function. better readable
02:03 <****> MIN(COUNT((*)) as lowmonth,MAX(COUNT(*)) as highmonth
02:03 <****> no ORDER BY needed then, it'll collapse into a single row
02:03 <****> anyone could help me fix this sql? $query = "SELECT * FROM tutoriais WHERE id!='8' AND (select COUNT(tutorial_id) as inscritos from inscricoes_tutoriais) < 79 ORDER BY tutorial";
02:04 <****> ugh
02:04 <****> Judge--: getting a syntax error, or?


Total 21 pages. You are browsing page 1/21.

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


Tutti i nuovi CAP Italiani. Come ottenere il database completo