FW: how to create database (auto)
Hi Richard, Do you think the following links may help? I got them from the online manual: [1] http://www.mysql.com/doc/en/CREATE_DATABASE.html [2] http://www.mysql.com/doc/en/CREATE_TABLE.html [3] http://www.mysql.com/doc/en/CREATE_FUNCTION.html [4] http://www.mysql.com/doc/en/CREATE_INDEX.html [5] http://www.mysql.com/doc/en/Cannot_create.html [6] http://www.mysql.com/doc/en/SHOW_CREATE_TABLE.html This was an automated reply to your message about 'how to create database'. I used 'create database' as a keyword to query the database. If you no longer want to receive messages from the bot, send email to [EMAIL PROTECTED] with subject unsubscribe. P.S. Feedbacks, suggestions and complaints should be directed to [EMAIL PROTECTED] -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Finding functions in manual (was RE: formatting query output)
:Putting : links for each : function under the categories might help with that. The : links could go to : the specific place on the big page (there would be no : need for a separate : page for each one). Of course, this is probably OT at this point. Try http://www.mysql.com/doc/en/Function_Index.html sherzod - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Row numbers
: Is there a way to get a row number returned with any select query? Row number is not available for some queries (ex.DELETE FROM table_name) for efficiency. You can disable it with a dummy WHERE clause: DELETE FROM table_name WHERE 1 0; It will be slower, but you'll get the desired result - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Row numbers (I thought of a new feature)
I thought of a new feature... XSLT's position()-like functionality in the new releases of MySQL. position(), in XSLT, returns position of the node in the document tree. In MySQL it would return position of the record in the returned result set (from SELECT query): Example: SELECT POSITION(), first_name, last_name WHERE last_name LIKE a%; Return value might be: 1 | Alpha | Beta | 2 | Aqua | Gamma | ... etc.. By default numbering would start with 1. But it can be alterled by passing argument to POSITION(). I believe it is an exciting feature. sherzod - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Generating an automatic e-mail via MySQL
: Does any one have a suggestion on running a daily / weekly e-mail : notification based on results from a MySQL query? In your cron file do something like: echo select * from table | mysql [options] db | mail [EMAIL PROTECTED] If it's a more complex query: cat ~/query.sql | mysql [options] db | mail [EMAIL PROTECTED] It still doesn't solve your problem perfectly, since you can't set email addresses dynamicly in that manner. I think you need to write a litle more than an SQl query or even a cron task. Go with either Perl or PHP. For sending email you can use either mail or sendmail. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Strange Updates
: select count(*) from Yellow WHERE MATCH(street_add) : AGAINST('+GUIDO : +MIGLIOLI' IN BOOLEAN MODE) AND street_short = ''; : : and the result was 50 rows in set. : : But when I ran the update: : UPDATE yellowtest.Yellow SET street_short = 'MIGLIOLI' WHERE : MATCH(street_add) AGAINST('+GUIDO +MIGLIOLI' IN BOOLEAN : MODE) AND : street_short = ''; : : the result was: : : Query OK, 0 rows affected (1 min 53.89 sec) : Rows matched: 0 Changed: 0 Warnings: 0 Most likely you're referensing different tables. Make sure that yellowtest.Yellow in the second query in fact points to Yellow database meant in the first query. Sherzod - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Safe way to allow users to create databases?
: Is there a safe way to allow ordinary users, who should : not have MySQL root privileges, to create databases using : any name they choose? It seems to me that I would need to : use GRANT ALL ON *.* TO user WITH GRANT OPTION. This : would be dangerous because of the other user's databases : and the mysql database itself. All the reference books I : have talk about the GRANT CREATE privilege with regard to : tables, not databases. Instead, allow users to create database through a gateway, such as CGI or some PHP application. Thus you will not have to do GRANT ALL ON *.*. CGI aplication will connect to mysql server with a specific account priveleged only to CREATE accounts and will create requested database and grants permissions accordingly. sherzod - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Is there a SQL/diff program out there?
: SYNOPSIS: : : Wondering if anyone knows of, or has built, or is : interested in building : a program that will take two .sql schema dumps (one new : and one old) and : create the ALTER / CREATE TABLE syntax to make the old : one look like the : new one. It should work in such a way that it doesn't : matter if the : table's schema are in the same order or not. : I actually tried to develop something of that sort, but parsing mysql statements accurately turned out to be a little more complex than I initially expected. Didn't want to spend too much time than I was willing to. So I quit. Sherzod - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: cannot locate dbi.pm while running perl scripts
: Hi : : : When I try running my perl scripts using DBI interface : with mysql, I got : this message:Can't locate DBI.pm in @INC((@INC contain : : /usr/lib/perl5/5.6.0/i386-linux : /usr/lib/perl5/5.6.0./usr/libperl5/site_perl/5.6.0/i386-linux : /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) : : Where can I get DBI.pm : In shell, simply type: % perl -MCPAN -e install DBI It will install it for you. If you don't have root access to the machine, replace the above command with %perl -MCPAN -e get DBI It will download it to ~/.cpan/build folder, and you can download it manually from there. For more information on using CPAN command line utility, refer to perldoc CPAN. good luck sherzod - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: backup data
: I am now thinking about using MySQL as my main office DB. Is : it going to be : easy te retrieve dta if there is crash or worse case senario : my OS dies? I : guess this is a back up question really? Try to backup your DB as often. mysqldump utility is mostly for that. Sherzod - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: sql CSV import
I normally do not use PHPMyAdmin. But when I had to do that once on a client's sites (he didn't have shell access to a shared server ), i had a similar problem. I couldn't import its own dump. I believe it was a bug, and should've been resolved in later versions of PHPMyAdmin. Try to update. Sherzod : -Original Message- : From: Dobromir Velev [mailto:[EMAIL PROTECTED]] : : You van use the LOAD DATA INFILE statement : : Check this : http://www.mysql.com/doc/en/LOAD_DATA.html : : for more information : : HTH : Dobromir Velev : [EMAIL PROTECTED] : www.websitepulse.com : : : - Original Message - : From: Andrew [EMAIL PROTECTED] : To: [EMAIL PROTECTED] : Sent: Thursday, January 30, 2003 12:48 : Subject: RE: sql CSV import : : : : Hi all I am trying to import a csv file from MySQL and keep : getting an : error on : line one. : Is there an alternative way to import a csv file other than using : phpmyadmin? : : I exported the file from MySQL but can't import it back in, : any ideas? : : Andrew : : : : : : : - : Before posting, please check: : http://www.mysql.com/manual.php (the manual) : http://lists.mysql.com/ (the list archive) : : To request this thread, e-mail [EMAIL PROTECTED] : To unsubscribe, e-mail : [EMAIL PROTECTED] : Trouble unsubscribing? Try: : http://lists.mysql.com/php/unsubscribe.php : : : : : - : Before posting, please check: :http://www.mysql.com/manual.php (the manual) :http://lists.mysql.com/ (the list archive) : : To request this thread, e-mail [EMAIL PROTECTED] : To unsubscribe, e-mail : [EMAIL PROTECTED] : Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php : : : : - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: What is faster?..
: The fastest way would be to use C. : But the reason for using a DB would be. : 1. Access to data. You could use PhPMyAdmin or some thing you : put together : to update the policy so making managing the data easy (possibly so non : tickers should make changes). : 2. If the data you are getting needs to be retrieved relationally. : It depends on the complexity of the policy too. If its has several sections, and each section needs to stand out, you will either have to use some markup (doesn't have to be HTML) to tell those sections apart, or store each section as a different raw of a table using a little more complex DB design. This also requires a little more complex SQL query to retrive them. I would probably use some minimum markup to mark the sections, and store the whole policy in a single cell. Good luck Sherzod - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Question about Table_Options
: When creating a table can you use multiple Table_Options? : : The O'Reilly Managing Using MySQL show on page 288 a : table been created : with two options ...)AUTO_INCREMENT = 1, TYPE=InnoDB; No commas used to seperate multiple options. Here is an example I just tried out, and I am afraid your book may be wrong ;-) mysql SELECT VERSION(); +---+ | VERSION() | +---+ | 3.23.54 | +---+ mysql CREATE TABLE test ( - id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY) - TYPE=MyISAM AUTO_INCREMENT=10; mysql INSERT INTo test SET id=NULL; mysql SELECT * FROM test; ++ | id | ++ | 10 | ++ Good luck Sherzod - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Making Lin/Win share DataSource
Wow, one hell of a discussion! :-) : Now, let's say DATADIR is in /var/lib/mysql/ under Linux, and under : Windows this is c:\mysql\data\ (I'm not informed how paths will look : like when you share them between OS's). : Guys, are you sure you can share files between two absolutely different file systems just like that? I don't think it's gonna be as easy as you want it to be. There should be some midleware solutions that may help you do that. In any event, I'm curious to find out myself. Sherzod - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: (SQL) Count Distincts
: : I am trying to get a count of Distinct IP's from my homemade hit-log : database (don't ask). The db is MySQL. I'm trying this: : : SELECT DISTINCT ClientIP, COUNT(*), Month(TimeStamp), : DayOfMonth(TimeStamp) FROM RedirectLog WHERE (TimeStamp BETWEEN : '2003013000' AND '2003013100') GROUP BY Month(TimeStamp), : DayOfMonth(TimeStamp) Looks like you are working on a project similar to http://traffic.handalak.com (login: demo password: demo). In the above example, you're trying to retrieve how many times a unique user (arguably) visited a site on certain month? In that case, you need to drop distinct and group it by IP address and specify the date inside WHERE clause. Simplified version would look something like: SELECT ClientIP, COUNT(*) FROM redirectLog WHERE MONTH(timeStamp) = MONTH(CURDATE()) GROUP BY clientIP; Good luck Sherzod - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: SQL Syntax
That is one bloody complex query :). As far as I know, MySQL does not support RIGHT JOIN leyword, so that's where it's failing. Someone slap me if I'm wrong. It may be possible to fetch the results you want without such a hairy query. Just include a partial dump of involved tables and concise desctiption of what you're trying to select. Otherwise, I don't have guts to look into that huge query myself! Hopefully someone will! :-P Sherzod : : : Hi All, : : Can anyone help me get this query working in MySQL, this : was created using : Access, but it doesn't port well for MySQL syntax: : : SELECT basket.id, : products.part_code, : products.product_type, : products.description, : product_options_1.options, : basket.price, basket.quantity, : basket.price*basket.quantity AS total : FROM (products LEFT JOIN product_options ON : products.prod_id=product_options.prod_id) : RIGHT JOIN (product_options AS product_options_1 RIGHT JOIN : (basket_header : INNER JOIN basket ON basket_header.basket_id=basket.basket_id) ON : product_options_1.po_id=basket.op_id) ON : products.prod_id=basket.prod_id : GROUP BY basket.id, products.part_code, products.product_type, : products.description, product_options_1.options, basket.price, : basket.quantity, basket.price*basket.quantity, : basket_header.basket_id, : products.options : HAVING (((basket_header.basket_id)=4)); : : Here is the error message MySQL reports: : : ERROR 1064: You have an error in your SQL syntax near : '(product_options AS : product_options_1 RIGHT JOIN (basket_header INNER JOIN : baske' at line 9 : : Seems MySQL doesn't like the RIGHT JOIN syntax. Any ideas : to the correct : syntax? : : Thanks, : : Kevin : : : : - : Before posting, please check: :http://www.mysql.com/manual.php (the manual) :http://lists.mysql.com/ (the list archive) : : To request this thread, e-mail [EMAIL PROTECTED] : To unsubscribe, e-mail : [EMAIL PROTECTED] : Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php : : : : - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
FW: line breaks
: : - what is the stored character code of the enter key in the : text field, i am : figuring out to find that character and replace it with the : br element, : for the exact display, That's what's normally done. Line breaks are usually represented by \n escape character. So all you should do is replace all the instances of \n with br /. The following substitution will do the trick: s/\n/br/g; : - do you have a shorter way to do this? There's no quite shorter way, there is however a dirty way. Simply wrap the text between pre and /pre tags while outputing to the browser. Sherzod sql, query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Getting Images in and out of a Blob
: Has anyone done any work with getting images into and out of a MYSQL : database? I have used mysql for some time, but never : stored an image : in a : blob field. I am curious on how to insert the image from a web form : upload, : and how to display the picture on another HTML page. : : You might want to start here: : http://www.mysql.com/doc/en/String_functions.html. Look for LOAD_FILE. If you're writing a web application which takes the file from the file field, then it's a lot easier to read the file into memory and back into the table with an INSERT clause. As to LOAD_FILE(), you will have to store the file in a temporary location before being able to use LOAD_FILE(). To serve images straight off the database, simply read the files into memory using a SELECT query, set the content-type header in your application to the mime-type of the image, say image/png, and write it to the stdout. Voila! Sherzod - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: setting auto increment start value
: Am Donnerstag, 30. Januar 2003 20:15 schrieb Mike Doanh Tran: : Hi all, : : I am creating a new table with an auto_increment primary key. : How do i tell mysql to start incrementing at a certain : value, let say : 1000 instead of 1? : : Thanks, : : MT : : SET INSERT_ID=1000 does it. Tabels have AUTO_INCREMENT option, which you will need to set while creating the table. In the following example id will start with 1000: CREATE TABLE test ( id INT AUTO_INCREMENT NOT NULL PRIMARY KEY, ) AUTO_INCREMENT=1000; Good luck Sherzod - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Increment in update
:+---+--+--+-+-++ :| Field | Type | Null | Key | Default | Extra | :+---+--+--+-+-++ :| id | int(11) | | PRI | NULL| :auto_increment | :| descr | varchar(255) | YES| MUL | NULL| | :+---+--+--+-+-++ : : :mysql update tb_roubr set id=id+1 where id1 order by id; :ERROR 1064: You have an error in your SQL syntax near 'order :by id' at line 1 :why this is not working and what are other ways to do such a query. You are defeating the purpose of auto_increment with id=id+1 expression. Simply pass it a NULL or nothing at all: UPDATE tb_roubr SET id=NULL WHERE id 1; Every time you pass id NULL value, mysql will *auto_increment* the value of the column automaticly so you never have to worry about it. Sherzod - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: datetime field question
:is there a way to use the date part of a datetime field that :still uses the :index on the datetime field? i've tried a few different things :and it keeps :saying in the explain it says that its a possible_key, but :NULL for the key I'm not sure if this ignores the indexes or not, but I mostly use DATE_FORMAT(). Assuming column t is a DATETIME column: SELECT DATE_FORMAT(t, %Y-%d-%m) FROM tbl_name; Have you tried it yet? Sherzod -- mysql,sql - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Getting Images in and out of a Blob
:Has anyone done any work with getting images into and out of a MYSQL :database? I have used mysql for some time, but never stored :an image in a :blob field. I am curious on how to insert the image from a :web form upload, :and how to display the picture on another HTML page. Preferred web :scripting is ColdFusion, but PHP/PERL would be helpful too. :Thank you for :your help. http://gallery.handalak.com/cgi-bin/gallery/1004 The above is my web gallery. That's how it works. I have a control panel from where upload images, and they are stored in mysql tables. Then programmaticly they are retrieved. If you look at the source of images tags, you may have an idea how it's done. Sherzod P.S. It's done in Perl - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: mysql php and blank variables...
:when i type :mysql_query(insert into table_name ('$var list'...); i come :up with a bunch :of :blank/empty variables... Try to debug your query by outputting to the stdout instead of sending to the mysql server. You can do it by simply echo()ing your query as it is to the browser or terminal. I'm sure you'll see it doesn't look like what you really had in mind. This debugging trick may also make this question a non-mysql related ;-). Good luck Sherzod - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Will DELAYED inserts solve my problem ( also related to indexing )
I have a hit logger tool, which does approximately 200,000 INSERTs a day into tables. The other application uses the same tables to run somewhat complex SELECT queries. Since these tables will be large, SELECT queries are quite slow. Indexing the tables produced prefect results for these SELECT queries. But I guess inserting into a large indexed table may be a lot slower? So my question is, may DELAYED inserts solve my problem here, and allow me to keep those tables indexed? Is there any other trick that may solve my problem? Thank you for any attempt to help. Sherzod - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MyISAM - Innodb
I heard about Innodb here a lot, but where can i find more info about it. I search mysql manuals, but no results. Any resources? Hi, I have a lot of MyISAM table that i wanna convert ot Innodb. They don't have any foreign keys nor BLOB or TEXT column as index. How should i do this? Should i just ALTER TABLE mytable TYPE=Innodb? Is there any risk? Thank u very much, Edilson. Edilson Vasconcelos de Melo Junior [EMAIL PROTECTED] (19) 3256-3577 ICQ 136192234 sql,query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail mysql-unsubscribe- [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MyISAM - Innodb
I heard about Innodb here a lot, but where can i find more info about it. I search mysql manuals, but no results. Any resources? Hi, I have a lot of MyISAM table that i wanna convert ot Innodb. They don't have any foreign keys nor BLOB or TEXT column as index. How should i do this? Should i just ALTER TABLE mytable TYPE=Innodb? Is there any risk? Thank u very much, Edilson. Edilson Vasconcelos de Melo Junior [EMAIL PROTECTED] (19) 3256-3577 ICQ 136192234 sql,query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail mysql-unsubscribe- [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MyISAM - Innodb
I heard about Innodb here a lot, but where can i find more info about it. I search mysql manuals, but no results. Any resources? Hi, I have a lot of MyISAM table that i wanna convert ot Innodb. They don't have any foreign keys nor BLOB or TEXT column as index. How should i do this? Should i just ALTER TABLE mytable TYPE=Innodb? Is there any risk? Thank u very much, Edilson. Edilson Vasconcelos de Melo Junior [EMAIL PROTECTED] (19) 3256-3577 ICQ 136192234 sql,query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail mysql-unsubscribe- [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Speed difference
: after timing the program that was targeting MySQL on different platforms : the results are (client program running always from the same box that is not : hosting MySQL): : : Windows NT - 25 sec (Intel P-III) : Linux - 27 sec (Intel P-III) : Solaris 2.7 - 1 min 40 sec (Ultra 5) : Solaris 2.7 - 1 min 32 sec (Ultra 10) : : Is there a reasonable explanation why is this happening. : Well, even though you run the same benchmark on the same machine several times, you'll get different results. So we also need to know if adequate iterations have been performed. So the time difference in the first two results aren't that much different at all. The same conclusion is true about the last two, But the slowness of Solaris boxes does impress me. So I believe (i'm not a solaris dude) Ultra is the processor, right? Then we could conclude that pentiums are much more faster then Ultras. Do you aggree? -- Sherzod Ruzmetov [EMAIL PROTECTED] http://www.UltraCgis.com, Consultant 989.774.6265 010010100101010101001100 ++ | There is nothing wrong with your tools.| | But we can make a better one. | ++ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Adding an incremented id field
: I've got a database already populated with data and need to add a : sequential numerical id field as a key. (as one would with an auto : increment field) : : Is there a straightforward sql statement that will do this? ALTER TABLE t_name ADD id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY; -- Sherzod Ruzmetov [EMAIL PROTECTED] http://www.UltraCgis.com, Consultant 989.774.6265 010010100101010101001100 ++ | There is nothing wrong with your tools.| | But we can make a better one. | ++ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
I can't think....
I have a column with a date in the future. Trying to figure out a query that would tell me how many days, mins left till that date. I'm realy tired, and can't think right now :( - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Installing DBI
I can install other moduels successfully. But when it comes to DBI, and DBD::mysql, it keeps throwing out the following error: make - not ok make returned bad status I am lost :-(. What could that be? -sherzodOR - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Hellp with this error message. I am lost :(
While installing mysql in a linux box (mandarake) i had this error. Please, guys, help me out. I need to install this mysql in this box as soon as possible :( ERROR [root@cral mysql]# scripts/mysql_install_db scripts/mysql_install_db: ./bin/my_print_defaults: cannot execute binary file WARNING: The host 'cral.cel.cmich.edu' could not be looked up with resolveip. This probably means that your libc libraries are not 100 % compatible with this binary MySQL version. The MySQL deamon, mysqld, should work normally with the exception that host name resolving will not work. This means that you should use IP addresses instead of hostnames when specifying MySQL privileges ! Preparing db table Preparing host table Preparing user table Preparing func table Preparing tables_priv table Preparing columns_priv table Installing all prepared tables scripts/mysql_install_db: ./bin/mysqld: cannot execute binary file Installation of grant tables failed! Examine the logs in ./data for more information. You can also try to start the mysqld daemon with: ./bin/mysqld --skip-grant You can use the command line tool ./bin/mysql to connect to the mysql database and look at the grant tables: shell ./bin/mysql -u root mysql mysql show tables Try 'mysqld --help' if you have problems with paths. Using --log gives you a log in ./data that may be helpful. The latest information about MySQL is available on the web at http://www.mysql.com Please consult the MySQL manual section: 'Problems running mysql_install_db', and the manual section that describes problems on your OS. Another information source is the MySQL email archive. Please check all of the above before mailing us! And if you do mail us, you MUST use the ./bin/mysqlbug script! [root@cral mysql]# mysqld --log bash: mysqld: command not found [root@cral mysql]# ls -l /ERROR Thank you - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
./configure errorRe: Solaris
Please,help1 [sherzod@cral mysql-3.23.39]$ ./configure loading cache ./config.cache checking host system type... i586-pc-linux-gnu checking target system type... i586-pc-linux-gnu checking build system type... i586-pc-linux-gnu checking for a BSD compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking whether make sets ${MAKE}... yes checking for working aclocal... missing checking for working autoconf... missing checking for working automake... missing checking for working autoheader... missing checking for working makeinfo... found checking whether to enable maintainer-specific portions of Makefiles... no checking whether build environment is sane... yes checking whether make sets ${MAKE}... (cached) yes checking for gawk... gawk checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking for c++... no checking for g++... no checking for gcc... gcc checking whether the C++ compiler (gcc ) works... no configure: error: installation or configuration problem: C++ compiler cannot create executables. [sherzod@cral mysql-3.23.39]$ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: MySQL with perl error
The only reason why that might happen (assuming it is working somewhere else), the object isn't return. So connect() constructor couldn't return the object. To read the error message from DBI, you'll have to read $DBI::errstr: my $dbh = DBI-connect(dsn, login, password) or die $DBI::errstr; If the program passes the above line without errors, you'll not have that error message. another way of doing the above is: my $dbh = DBI-connect(dsn, login, password, {RaiseError=}); Sent on Jul 4 by Dawn H to [EMAIL PROTECTED] dpengu The error log says, dpengu dpengu Can't call method do: on an undefined value. . . dpengu dpengu But the EXACT SAME code works on another script I'm running. I don't see any dpengu reason for it to suddenly have a problem. What does this error message MEAN? dpengu dpengu Code Snippet-- dpengu # Form was okay; get image type and contents and create new record. dpengu # Use REPLACE to clobber any old image with the same name. dpengu dpengu $mime_type = uploadInfo ($image)-{'Content-Type'}; dpengu ($full, $thumb) = read_image_file ($image); dpengu $dbh-do (REPLACE INTO image dpengu (name,listing_id,image,thumbnail,mime_type) dpengu VALUES(?,?,?,?,?), dpengu undef, dpengu $name, $listing_id, $full, $thumb, $mime_type) dpengu or bail_out(There's a problem with the upload); dpengu -End Snippet--- dpengu dpengu http://www.rdcss.com/ - RD Computer Solutions dpengu http://wow.cooncheese.com/ - WOW.CoonCheese.com dpengu http://dpenguin.rdcss.com/ - Cornucopia dpengu Filter fixer: database,sql,query dpengu dpengu dpengu - dpengu Before posting, please check: dpenguhttp://www.mysql.com/manual.php (the manual) dpenguhttp://lists.mysql.com/ (the list archive) dpengu dpengu To request this thread, e-mail [EMAIL PROTECTED] dpengu To unsubscribe, e-mail [EMAIL PROTECTED] dpengu Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php dpengu -- Sherzod Ruzmetov [EMAIL PROTECTED] http://www.ultracgis.com/sherzodR - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Help please, create table, and set Auto field
You meaaan, auto incrementing field ??? If so CREATE TABLE t_name (id INT AUTO_INCREMENT); Workds. But there's no auto digital number thingy Sent on Jul 4 by Web Mailing List to [EMAIL PROTECTED] websig I move from MDB to mySQL, I got a question concern how to create a auto digital number field in mysql table, websig websig create table namelist ( name char(60), ID auto, date date()); websig websig websig websig -- Sherzod Ruzmetov [EMAIL PROTECTED] http://www.ultracgis.com/sherzodR - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Store picture
Well, i did that using Perl/CGI. I have no clue how to load it directly. WHat i did was opened a *.gif file, and stored it into the BLOB column the same way as you would text. That's it Sent on Jul 4 by Moonesh Suggun to MySQL News Group suggun hi To All, suggun suggun Has anyone try to insert images e.h. gif into mysql database.. I have tried using blob type but how would I verify that it is OK. suggun suggun Thanks in advance, suggun Regards, suggun Moonesh suggun -- Sherzod Ruzmetov [EMAIL PROTECTED] http://www.ultracgis.com/sherzodR - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: converting database as text
Hi Alexandrino. Have you tried % mysqldump db_name [table_name] ? Try it -- Sherzod Ruzmetov [EMAIL PROTECTED] http://www.ultracgis.com/sherzodR Sent on Jul 3 by Alexandrino B. Arvesu to [EMAIL PROTECTED] alex Hi, alex alex Is there a way of converting mySQL database to a readable text file? alex What I mean is not importing the data via myODBC from another client, but by alex issuing a command to the alex Unix prompt (mySQL server itself) then it will generate a readable text alex file. alex alex Thanks in advance. alex alex Alex alex alex alex alex alex - alex Before posting, please check: alexhttp://www.mysql.com/manual.php (the manual) alexhttp://lists.mysql.com/ (the list archive) alex alex To request this thread, e-mail [EMAIL PROTECTED] alex To unsubscribe, e-mail [EMAIL PROTECTED] alex Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php alex - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Funny :-)
LOL, No you are not (i guess). It's just this mailing list software that stupid :) So ignore it. Afterall, even though you are Annoying, that's this mailing list software making you annoying , isn't it :) -- sherzod_ruzmetov (sherzodR) email: [EMAIL PROTECTED] So what if I have a fertile brain? Fertilizer happens. -- Larry Wall in [EMAIL PROTECTED] Sent on Jul 3 by [EMAIL PROTECTED] to [EMAIL PROTECTED] massey massey Why do I keep getting Unsubscribe notices? Am I that anoying LOL. massey massey massey Cheers massey massey M ;-) massey massey Got MySQL massey massey massey - massey Before posting, please check: masseyhttp://www.mysql.com/manual.php (the manual) masseyhttp://lists.mysql.com/ (the list archive) massey massey To request this thread, e-mail [EMAIL PROTECTED] massey To unsubscribe, e-mail [EMAIL PROTECTED] massey Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php massey - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: users in MySQL
Sent on Jul 3 by Daniel Aderhold to [EMAIL PROTECTED] aderho Can anyone give the adress of another manual of MySQL (not from mysql.com). Why is that ??? The manually you're not willing to use is indeed the *official* manual, which also means the more comprehensive one you can think of. If you don't find that comprehensive, there're none (I believe) to please you Sorry -- sherzod_ruzmetov (sherzodR) email: [EMAIL PROTECTED] I wasn't recommending that we make the links for them, only provide them with the tools to do so if they want to take the gamble (or the gambol). -- Larry Wall in [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Good book for MySQL and Perl DBI?
Actually, a new book by Paul is to be published MySql and Perl for WWW. Gonna be a great one. (to be published on August 13th) -- sherzod_ruzmetov (sherzodR) email: [EMAIL PROTECTED] It really doesn't bother me if people want to use grep or map in a void context. It didn't bother me before there was a for modifier, and now that there is one, it still doesn't bother me. I'm just not very easy to bother. -- Larry Wall in [EMAIL PROTECTED] Sent on Jul 2 by Chris Worth to Chris Petersen and MYSQL caw caw Paul DuBois' Book. caw caw it is extremely well written and indexed. I've gone from a complete mysql bumbler to caw somebody that can actually make it work in a short time thanks to his book. caw caw caw Chris caw caw caw On Sat, 23 Jun 2001 16:40:04 -0500, Chris Petersen wrote: caw caw Does anyone have any recommendations for a good book on MySQL SQL? What caw about PerlDBI (I noticed that the O'Reilly one is over a year old)? caw caw Just realizing that there's so much out there that I haven't been told... caw caw -Chris caw caw caw - caw Before posting, please check: cawhttp://www.mysql.com/manual.php (the manual) cawhttp://lists.mysql.com/ (the list archive) caw caw To request this thread, e-mail [EMAIL PROTECTED] caw To unsubscribe, e-mail caw [EMAIL PROTECTED] caw Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php caw caw caw caw caw - caw Before posting, please check: cawhttp://www.mysql.com/manual.php (the manual) cawhttp://lists.mysql.com/ (the list archive) caw caw To request this thread, e-mail [EMAIL PROTECTED] caw To unsubscribe, e-mail [EMAIL PROTECTED] caw Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php caw - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: message traffic
I do aggree with dave's point. Could we do that, please On Thu, 28 Jun 2001, Dave Halliday wrote: Quick question - just signed up for this list and I was wondering if it would be possible to put a [MySQL] tag in the subject line? There doesn't seem to be a standard identifier in the messages and although I am filtering the entire header looking for instances of mysql my reader ( Pegasus ) doesn't always catch it. Most other lists I subscribe to either have the tag at the beginning of the subject line or spoof the address to read the list origin. Either way allows for flawless filtering. Thanks! Dave David G. Halliday The Glosten Associates 600 Mutual Life Building 605 First Avenue Seattle, WA 98104-2224 (206) 624-7850 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: DISTINCT
Well, I can say that the problem is becasue of GROUP BY clause. I'd say its use in that query is void isn't it? Correct me if I'm wrong, but as far as I know, there should be summary functions in your select, which I cannot see in yours. So it should give you an error -sherzdoR On Wed, 27 Jun 2001, tom harrow wrote: Hannes... The last scenario is exactly the problem i have... when i try to use your example i get an error with the sql when creating the table do i have to specify the data type or anything like that or should it be as simple as CREATE table distinct_records SELECT field_1, field_2, field_3 FROM table_duplicate_records GROUP BY field_1, field_2, field_3; thanks in advance :-) tom -Original Message- From: Hannes Niedner [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 26, 2001 5:45 PM To: tom harrow; [EMAIL PROTECTED] Subject: Re: DISTINCT Hi Tom, The solution to your problem could be simple if the redundancy is across all fields. Then you could simply issue a CREATE table distinct_records SELECT distinct field_1,.field_last FROM table_duplicate_records WHERE 1=1; Or CREATE table distinct_records SELECT field_1,.field_last FROM table_duplicate_records GROUP BY field_1,.field_last; The latter will not work properly if one or more of the fields selected is not identical for identical combinations of the remaining fields. Otherwise if you have one or more fields that is not identical among a group of otherwise (apart from those fields) duplicate records) you must decide if this difference matters to you or not. If they don¹t matter just select all where the duplicates are identical. Make sure that the fields in the select and group by part are the same. Example table_duplicate records field_1 field_2 field_3 a b c a b c a b d f g h f g h d j k k i o CREATE table distinct_records SELECT field_1, field_2, field_3 FROM table_duplicate_records GROUP BY field_1, field_2, field_3; table_distinct_records field_1 field_2 field_3 a b c a b d f g h d j k k i o Got the idea? Hope that helps Hannes On 6/26/01 4:00 AM, tom harrow [EMAIL PROTECTED] wrote: Hi Hannes I saw your reply to a question someone had regarding the DISTINCT keyword and doing the opposite. I too have the same problem... basically need to know the values that arnt distinct and get rid of them but keeping one of course... so there are no duplicates. i am trying to write an asp applicatiojn to do it at the mo but its getting quitre complex. Anyway I thinkk im looking far to deep into the problem and there is probably a much simpler way of doing it. any ideas cheers Tom Harrow Web Developer Netpoll Ltd 9-12 Long Lane London EC1A 9HA TEL 020 7710 2800 FAX 020 7710 2828 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: DISTINCT
Try this: CEATE TABLE new_table SELECT DISTINCT NAME, EMAIL, AGE FROM whatever_table On Wed, 27 Jun 2001, tom harrow wrote: Actually I now realise that im solving the wrong proplem. here is a simplified version of my dilema * NAME EMAIL AGE tom tom@mail23 dick tom@mail76 pete pete@email 54 dave cool@mail 21 steve steve@mail 17 mary cool@mail 89 thomastom@mail13 rich rich@mail 65 rich dick@mail 33 tom tom@mail23 tom tom@mail23 so what i want to do is cut it down so there are no duplicate email addresses. I want the table looking like this: * NAME EMAIL AGE tom tom@mail23 pete pete@email 54 dave cool@mail 21 steve steve@mail 17 rich rich@mail 65 rich dick@mail 33 Cheers tom -Original Message- From: Hannes Niedner [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 26, 2001 5:45 PM To: tom harrow; [EMAIL PROTECTED] Subject: Re: DISTINCT Hi Tom, The solution to your problem could be simple if the redundancy is across all fields. Then you could simply issue a CREATE table distinct_records SELECT distinct field_1,.field_last FROM table_duplicate_records WHERE 1=1; Or CREATE table distinct_records SELECT field_1,.field_last FROM table_duplicate_records GROUP BY field_1,.field_last; The latter will not work properly if one or more of the fields selected is not identical for identical combinations of the remaining fields. Otherwise if you have one or more fields that is not identical among a group of otherwise (apart from those fields) duplicate records) you must decide if this difference matters to you or not. If they don¹t matter just select all where the duplicates are identical. Make sure that the fields in the select and group by part are the same. Example table_duplicate records field_1 field_2 field_3 a b c a b c a b d f g h f g h d j k k i o CREATE table distinct_records SELECT field_1, field_2, field_3 FROM table_duplicate_records GROUP BY field_1, field_2, field_3; table_distinct_records field_1 field_2 field_3 a b c a b d f g h d j k k i o Got the idea? Hope that helps Hannes On 6/26/01 4:00 AM, tom harrow [EMAIL PROTECTED] wrote: Hi Hannes I saw your reply to a question someone had regarding the DISTINCT keyword and doing the opposite. I too have the same problem... basically need to know the values that arnt distinct and get rid of them but keeping one of course... so there are no duplicates. i am trying to write an asp applicatiojn to do it at the mo but its getting quitre complex. Anyway I thinkk im looking far to deep into the problem and there is probably a much simpler way of doing it. any ideas cheers Tom Harrow Web Developer Netpoll Ltd 9-12 Long Lane London EC1A 9HA TEL 020 7710 2800 FAX 020 7710 2828 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Creating Table with a Default Datetime field
I, c. Then you just have to INSERT INTO it NOW() manually, that works On Wed, 27 Jun 2001, Pete Harlan wrote: TIMESTAMP is not the solution to his problem; he wants the date to default to now() when the record is created, not updated. There's currently no way to do this in MySQL; default values must be constants. --Pete hi. check out the TIMESTAMP column type...maybe TIMESTAMP(14) as the column type? you can then format the date accordingly with...uh...DATE_FORMAT() in your select statements... hth. -ravi -Original Message- From: Richard Bates [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 26, 2001 3:00 PM To: [EMAIL PROTECTED] Subject: Creating Table with a Default Datetime field How do I get a default date time in the create table clause... I have tried Create table( CreationDateDATETIMEDEFAULT NOW(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT NOW(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT SYSDATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT SYSDATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT CURRENT_DATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT CURRENT_DATE(), Infovarchar(100) ); All without the quote return with invalid syntax. With the quote inserts 000-00-00 00:00:00 meaining invalid date. == === Richard Bates === TELEHOUSE America == - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Creating Table with a Default Datetime field
Wait, I didn't get the following: an alternate solution is to have a table like this: Create table( UpdatedDatetimestamp(14), CreationDatetimestamp(14), Infovarchar(100) ); as mysql only automatically updates the _first_ timestamp column in a table. . Could you tell me more about it? And how does it solve thr problem? hth. -ravi. -Original Message- From: Sherzod Ruzmetov [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 27, 2001 1:40 PM To: Pete Harlan Cc: Ravi Raman; Richard Bates; [EMAIL PROTECTED] Subject: Re: Creating Table with a Default Datetime field I, c. Then you just have to INSERT INTO it NOW() manually, that works On Wed, 27 Jun 2001, Pete Harlan wrote: TIMESTAMP is not the solution to his problem; he wants the date to default to now() when the record is created, not updated. There's currently no way to do this in MySQL; default values must be constants. --Pete hi. check out the TIMESTAMP column type...maybe TIMESTAMP(14) as the column type? you can then format the date accordingly with...uh...DATE_FORMAT() in your select statements... hth. -ravi -Original Message- From: Richard Bates [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 26, 2001 3:00 PM To: [EMAIL PROTECTED] Subject: Creating Table with a Default Datetime field How do I get a default date time in the create table clause... I have tried Create table( CreationDateDATETIMEDEFAULT NOW(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT NOW(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT SYSDATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT SYSDATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT CURRENT_DATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT CURRENT_DATE(), Infovarchar(100) ); All without the quote return with invalid syntax. With the quote inserts 000-00-00 00:00:00 meaining invalid date. == === Richard Bates === TELEHOUSE America == - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Creating Table with a Default Datetime field
Thanks, ravi. Have I missed that in the documentation? If it is not there, could you guys include it please. I think It's a good one -sherzodR On Wed, 27 Jun 2001, Ravi Raman wrote: hi. assuming all inserts and updates never specify a value for UpdatedDate or CreationDate, on the initial insert: mysql insert into table (Info) values ('blahblahblah'); they will both be set to '20010627125429' or something. any subsequent updates: mysql update table set Info='somethingelse' where Info='blahblahblah'; will leave CreationDate as its original value, and change UpdatedDate to whatever the current timestamp is because it is first in the table description/create definition. hth. -ravi. -Original Message- From: Sherzod Ruzmetov [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 27, 2001 2:10 PM To: Ravi Raman Cc: Pete Harlan; Richard Bates; [EMAIL PROTECTED] Subject: RE: Creating Table with a Default Datetime field Wait, I didn't get the following: an alternate solution is to have a table like this: Create table( UpdatedDatetimestamp(14), CreationDatetimestamp(14), Infovarchar(100) ); as mysql only automatically updates the _first_ timestamp column in a table. . Could you tell me more about it? And how does it solve thr problem? hth. -ravi. -Original Message- From: Sherzod Ruzmetov [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 27, 2001 1:40 PM To: Pete Harlan Cc: Ravi Raman; Richard Bates; [EMAIL PROTECTED] Subject: Re: Creating Table with a Default Datetime field I, c. Then you just have to INSERT INTO it NOW() manually, that works On Wed, 27 Jun 2001, Pete Harlan wrote: TIMESTAMP is not the solution to his problem; he wants the date to default to now() when the record is created, not updated. There's currently no way to do this in MySQL; default values must be constants. --Pete hi. check out the TIMESTAMP column type...maybe TIMESTAMP(14) as the column type? you can then format the date accordingly with...uh...DATE_FORMAT() in your select statements... hth. -ravi -Original Message- From: Richard Bates [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 26, 2001 3:00 PM To: [EMAIL PROTECTED] Subject: Creating Table with a Default Datetime field How do I get a default date time in the create table clause... I have tried Create table( CreationDateDATETIMEDEFAULT NOW(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT NOW(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT SYSDATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT SYSDATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT CURRENT_DATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT CURRENT_DATE(), Infovarchar(100) ); All without the quote return with invalid syntax. With the quote inserts 000-00-00 00:00:00 meaining invalid date. == === Richard Bates === TELEHOUSE America == - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request
Re: Table Creation
Please, go through the manual found at http://www.mysql.com - -sherzodR phone: (517) 774-2702 email: [EMAIL PROTECTED] On Wed, 27 Jun 2001, Richard Bergeron wrote: Hi, I'm new to this flavor of SQL, I've downloaded WinMySQLadmin version 1.1 for Win98, I seem to be missing components? 1. I can only create Databases not Tables? 2. I'm don't know which source editor/compiler I can use? Can anyone help? Thanks.Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Default Datetime?
But how about TIMESTAMP? For example: CREATE TABLE time_test (creation_date TIMESTAMP, info VARCHAR(100)); This should work fine too,doesn't it? -sherzodR On Tue, 26 Jun 2001, Paul DuBois wrote: At 2:43 PM -0400 6/26/01, Richard Bates wrote: How do I get a default date time in the create table clause... The MySQL Reference Manual states that DEFAULT values must be constants. Insert NOW() into the field when you create new records. I have tried Create table( CreationDateDATETIMEDEFAULT NOW(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT NOW(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT SYSDATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT SYSDATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT CURRENT_DATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT CURRENT_DATE(), Infovarchar(100) ); All without the quote return with invalid syntax. With the quote inserts 000-00-00 00:00:00 meaining invalid date. == === Richard Bates === TELEHOUSE America == -- Paul DuBois, [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySql to Oracle migration
Can someone explain me why is it waste of space??? Thank you -sherzodR On Tue, 26 Jun 2001, Tim Bunce wrote: On Tue, Jun 12, 2001 at 04:42:42PM -0700, Jeremy Zawodny wrote: On Tue, Jun 12, 2001 at 05:06:59PM -0500, Zhu George-CZZ010 wrote: Is there a way/tool to migrate the Application from MySql to Oracle 8i? Oracle has one available on their web site... Mostly a waste of space. Tim. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
mySQL design for the questionnaire
As a student CGI programmer, I've been working on an online questionnaire. I have been working so hard to design the mysql db part, still I'm not sure if I've done it right. Still somethings seem to be awkward. Here I'm DESCRIBing the tables for you, then i'm explaining how I inteded to use it: mysql DESC cral2_questions; +-+---+--+-+-++-+ | Field | Type | Null | Key | Default | Extra +-+---+--+-+-++-+ | question_id | int(10) unsigned | | PRI | NULL| auto_increment | question| text | | | | | type| enum('r','c','t') | | | r | | calculate | enum('yes','no') | YES | | NULL| +-+---+--+-+-++-+ 4 rows in set (0.01 sec) mysql DESC cral2_answers; ++--+--+-+-+---+-+ | Field | Type | Null | Key | Default | Extra | ++--+--+-+-+---+-+ | answer_id | int(10) unsigned | | | 0 | | | question_id| int(10) unsigned | | | 0 | | | answer | char(200)| | | | | | if_checked | int(10) unsigned | YES | | NULL| | | if_not_checked | int(10) unsigned | YES | | NULL| | ++--+--+-+-+---+-+ 5 rows in set (0.00 sec) The first table stores questions and the second one stores their answers. If you look at the type column, r stands for RADIO BUTTONED, which means only one of the options could be checked, c means CHECK BOXED or CHECK ALL THAT APPLY type of questions, and t stands for TEXT FIELDED, and respondent would have to type something in, which will be matched agains a respective REGEXP. CGI script also calculates the results, and provides an instant feedback depending on the score a student gets. Of course in addition to the above tables, I'll be needing a table for storing each students information by assigning an auto_incrementing number for each student, storing the the students answers, answer key table. Do you guys think I'm making it too much complicated? I can give you the link for the initial step of the application. I developed it for the experts where they rated and provided feedback for each item, according to which we had to fine-tune the questions. Since we have the fine-tuned questions now, I started working on the final part (for students). URL: http://www.ultracgis.com/cgi-bin/cral.v1.cgi You can access the questionnaire from here. And the control panel is at http://www.ultracgis.com/cgi-bin/cral.v1.cgi/ControlPanel I really need experts ideas. Thank you - -sherzodR phone: (517) 774-2702 email: [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Select and = MAX()
Why bother when the following works: mysql SELECT price FROM shop ORDER BY price DESC LIMIT 1; On Tue, 26 Jun 2001, R Talbot wrote: Following the Tutorial Creating and populating the table Shop in the db Test.. Why won't the following syntax work? mysql select price - from shop - where price=Max(price) ; ERROR : Invalid use of group function Bob T - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php