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

Channels


#mysql

01 January 2008


Total 13 pages. You are browsing page 3/13.

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

02:56 <****> :)
02:58 <****> rvalles: Hmmmm - actually I think I might've done it by creating the db first, thus creating an empty dir in /var/lib/mysql and then copying the files inside over for the tables
02:58 <****> rvalles: that would get round that problem - as there is no db keeping track of the tables - they just "exist" inside the db
02:58 <****> rvalles: just copying the files will work fine.
02:59 <****> chadmaynard: ok
02:59 <****> I'll give that a try then (later, tho)
02:59 <****> rvalles: if you are using innodb you should be careful
03:51 <****> Hello
03:51 <****> Mysql is open source?
03:53 <****> Yes
03:54 <****> but people outside of the mysql group cannot contribute to the program?
03:54 <****> i just drove home, behind a car with license plate 'MR SQL'
03:55 <****> lol
03:56 * dasKreech laughs
03:57 <****> I wonder if there is a Mrs SQL
03:57 <****> so it's open source but you can't contribute to the program?
03:57 <****> dasKreech: you can contribute
03:58 <****> Ok
03:58 <****> what's funny is he was driving really really slow, so slow that the guy behind me started honking
03:58 <****> Just read an article that says that you couldn't
03:59 <****> dryrot: http://www.thinkgeek.com/tshirts/coder/595d/
03:59 <****> Send him a gift
03:59 <****> dasKreech: mysql licensing page: http://www.mysql.com/company/legal/licensing/
04:01 <****> ToeBee: What is that in answer to?
04:01 <****> Mysql being open source or being able to contribute?
04:01 <****> oh I guess you weren't asking about licensing...
04:03 <****> if I am loading data from a csv, how can I avoid inserting records with the same key?
04:04 <****> are you using LOAD DATA or are you parsing it yourself?
04:04 <****> +
04:04 <****> hmm either way I think you can use IGNORE
04:04 <****> ok, thanks
04:05 <****> well you'll need a unique constraint on your key column
04:05 <****> or if it is already a primary key that will work
04:06 <****> IGNORE.... or INSERT IGNORE into table...
04:19 <****> guys, can anyone see what is wrong with this?
04:19 <****> CREATE TABLE main_info_usr_comment (draw_date DATE NOT NULL, comment_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT, updatedby_user_id BIGINT UNSIGNED NOT NULL, comment TEXT NOT NULL, comment_parent SMALLINT, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, hidden TINYINT(1) NOT NULL, hidden_reason VARCHAR(255), parent_comment SMALLINT UNSIGNED, main_info_id MEDIUMINT UNSIGNED NOT NULL, PRIMARY KEY(draw_date, comment_i
04:19 <****> d)) ENGINE = INNODB;
04:19 <****> It doesn't work.
04:20 <****> FauxFaux, thank you
04:20 <****> this is the error
04:20 <****> there can be only one auto column and it must be defined as a key
04:20 <****> ;-)
04:20 <****> there is only one autoincrement
04:21 <****> and it is included in the primary key (well, a combined key with the draw_date)
04:21 <****> does anyone have any ideas, please?
04:23 <****> Nice job FauxFaux
04:23 <****> "It doesn't work"
04:24 <****> :D
04:24 <****> I was right!
04:24 <****> yea, you win this time!
04:24 <****> hal1: The obvious guess would be that the entire primary key has to be auto-incrememnt, but I can't see why.
04:24 <****> Just delete columns until it works, then add them until it doesn't.
04:24 <****> It's not exactly a hard space to exhaustively search, even without a single grain of knowledge about wtf is going on, like me.
04:26 <****> FauxFaux, you speak wise words! ;-)
04:27 <****> actually I can see what column is causing the problem, but just don't know how to achieve the results I need
04:28 <****> I want the column with the date in and a column with an autoincrement to be the combined key
04:28 <****> Surely an n'th on this day would be neater?
04:28 <****> Or nth on this second, or..
04:33 <****> hal1: try to switch the primary key definition around
04:34 <****> chadmaynard, OK
04:34 <****> hal1: although I have doubts that this does what you want. It will, however, be legal if comment_id comes before draw_date
04:51 <****> chadmaynard, that was it!!!! Great, thank you very much!
04:55 <****> Hi guys. Can someone please help with this problem I'm having? When a variable for $where is given, it causes an sql error.. it has Select * from news where type='public' ".$where." order by dateposted desc
04:55 <****> Inside an if (php) is : $where=' and where title like "%'.$_GET['title'].'%"';
04:55 <****> I think it's because it says where type='public' and where title like '..'
04:56 <****> Danny: echo out the actual query after $where is evaluated
04:56 <****> 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 'where title like "%Happy new%" order by dateposted desc' at line 1
04:57 <****> I want the whole query string without any php variables in it
05:01 <****> Select * from news where type='public' and where title like "%Happy new%" order by dateposted desc
05:01 <****> oh well there's your problem
05:01 <****> only one "where"
05:01 <****> where type = 'public and title like '%Happy new%'
05:02 <****> also ' instead of " around the %Happy new%
05:04 <****> ahh
05:04 <****> ok, thank you
05:09 <****> Hey I need to know how to use where clause on the DateTime datatype
05:10 <****> sethuhdiah: show us the sql that isn't working, and the error.
05:11 <****> ".date()." ORDER BY 'when' DESC
05:11 <****> quotes
05:11 <****> Use ` around identifiers (database/table/column/alias names) and ' around strings and dates. MySQL does allow " for strings, but ANSI standard uses " for identifiers (which you can enable with ANSI QUOTES option) and dont quote numbers
05:11 <****> sethuhdiah: ^^
05:12 <****> ".date()." ORDER BY 'when' DESC")
05:13 <****> sethuhdiah: read the_wench's last line
05:13 <****> sethuhdiah: there is a difference between a backtick `when` and a single quote 'when'
05:15 <****> sethuhdiah: you should read a tutorial
05:15 <****> tutorial
05:15 <****> MySQL Tutorial: http://www.mysql.com/doc/en/Tutorial.html SQL Tutorial: http://www.sqlcourse.com and tut.php-q.net/mysql.html
05:15 <****> date() part. I just need to know the right way to compare the DateTime datatype..
05:18 <****> sethuhdiah: I'm not sure what ".date()." is supposed to represent. mysql's datetime format is yyyy-mm-dd hh:mm:ss
05:18 <****> sethuhdiah: and it gets surrounded by single quotes
05:18 <****> its a php variable for todays date
05:19 <****> sethuhdiah: echo your sql and paste that, not your php code. we have no way of knowing if your php variables contain the values you believe they do.
05:20 <****> sethuhdiah: and a php date value cannot, by defintion, match a mysql datetime data type.
05:20 <****> cannot match*
05:20 <****> Ok I think i got it to work
05:20 <****> enough for me for tonight. ciao, all. happy new year
05:21 <****> Thanks
05:21 <****> hi
05:21 <****> can you change the collation of all columns in a table at once
05:22 <****> ALTER TABLE tablename SET CHARACTER SET `utf8` COLLATE `utf8_bin`; didnt work


Total 13 pages. You are browsing page 3/13.

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


Tutti i nuovi CAP Italiani. Come ottenere il database completo