Records w/in 1 week Time Frame
How can I pull all records within a 1 week time frame? So if I enter 2003-10-19, how can I write a query that will get all records from 2003-10-12 - 2003-10-19. Thanks in advance. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqldump script
Using 3.23.54 mysqldump produces DB references when scripting foreign keys. I.E FOREIGN KEY (`KEYNAME`) REFERENCES `DBNAME.TABLENAME` (`KEYFIELD`) Is there a way to avoid "DBNAME."? Using a template DB which is copied to new DB's with different names, hand editing is a pain. Could possibly be stream edited with "sed", just don't know how to do it... 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
Error linking mysqlclient
Getting the following errors when trying to link client application written in C: /usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_uncompress': my_compress.o(.text+0xaa): undefined reference to `uncompress' /usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_compress_alloc': my_compress.o(.text+0x13c): undefined reference to `compress' Any help to resolve this problem will be appreciated. /Lars 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: Error linking mysqlclient
Found it myself... checking the documentation isn't such a bad idea... adding -lz did the trick. /Lars > Getting the following errors when trying to link client application > written in C: > > /usr/lib/mysql/libmysqlclient.a(my_compress.o): In function > `my_uncompress': > my_compress.o(.text+0xaa): undefined reference to `uncompress' > /usr/lib/mysql/libmysqlclient.a(my_compress.o): In function > `my_compress_alloc': > my_compress.o(.text+0x13c): undefined reference to `compress' > > Any help to resolve this problem will be appreciated. > > /Lars > > > 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
primary key
how to use more than one field in a table as combined primary key. e-mail= [EMAIL PROTECTED]
Re: confirm subscribe to mysql@lists.mysql.com
On 16 Dec 2002 10:09:43 - [EMAIL PROTECTED] wrote: > Hi! This is the ezmlm program. I'm managing the > [EMAIL PROTECTED] mailing list. > > To confirm that you would like > >[EMAIL PROTECTED] > > added to the mysql mailing list, please send > an empty reply to this address: > >[EMAIL PROTECTED] > > Usually, this happens when you just hit the "reply" button. > If this does not work, simply copy the address and paste it into > the "To:" field of a new message. > > This confirmation serves two purposes. First, it verifies that I am able > to get mail through to you. Second, it protects you in case someone > forges a subscription request in your name. > > Some mail programs are broken and cannot handle long addresses. If you > cannot reply to this request, instead send a message to > <[EMAIL PROTECTED]> and put the > entire address listed above into the "Subject:" line. > > > --- Administrative commands for the mysql list --- > > I can handle administrative requests automatically. Please > do not send them to the list address! Instead, send > your message to the correct command address: > > To subscribe to the list, send a message to: ><[EMAIL PROTECTED]> > > To remove your address from the list, send a message to the address > in the "List-Unsubscribe" header of messages from the list. If you don't > know how to display headers and haven't changed E-mail addresses since > subscribing, you'll be successful with an e-mail to: ><[EMAIL PROTECTED]> > > Send mail to the following for info and FAQ for this list: ><[EMAIL PROTECTED]> ><[EMAIL PROTECTED]> > > Similar addresses exist for the digest list: ><[EMAIL PROTECTED]> ><[EMAIL PROTECTED]> > > To get messages 123 through 145 (a maximum of 100 per request), mail: ><[EMAIL PROTECTED]> > > To get an index with subject and author for messages 123-456 , mail: ><[EMAIL PROTECTED]> > > They are always returned as sets of 100, max 2000 per request, > so you'll actually get 100-499. > > To receive all messages with the same subject as message 12345, > send an empty message to: ><[EMAIL PROTECTED]> > > The messages do not really need to be empty, but I will ignore > their content. Only the ADDRESS you send to is important. > > You can start a subscription for an alternate address, > for example "[EMAIL PROTECTED]", just add a hyphen and your > address (with '=' instead of '@') after the command word: > <[EMAIL PROTECTED]> > > To stop subscription for this address, mail: > <[EMAIL PROTECTED]> > > In both cases, I'll send a confirmation message to that address. When > you receive it, simply reply to it to complete your subscription. > > If despite following these instructions, you do not get the > desired results, please contact my owner at > [EMAIL PROTECTED] Please be patient, my owner is a > lot slower than I am ;-) > > --- Enclosed is a copy of the request I received. > > Return-Path: <[EMAIL PROTECTED]> > Received: (qmail 5141 invoked from network); 16 Dec 2002 10:09:43 - > Received: from pcow035o.blueyonder.co.uk (HELO blueyonder.co.uk) (195.188.53.121) > by www.mysql.com with SMTP; 16 Dec 2002 10:09:43 - > Received: from pcow035o.blueyonder.co.uk ([127.0.0.1]) by blueyonder.co.uk with >Microsoft SMTPSVC(5.5.1877.757.75); >Mon, 16 Dec 2002 10:09:41 + > Received: from fruitnfibre (unverified [62.31.78.139]) by pcow035o.blueyonder.co.uk > (Content Technologies SMTPRS 4.2.9) with SMTP id ><[EMAIL PROTECTED]> for ><[EMAIL PROTECTED]>; > Mon, 16 Dec 2002 10:09:41 + > Date: Mon, 16 Dec 2002 10:10:13 + > From: Intrallect Developer <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Message-Id: <[EMAIL PROTECTED]> > Organization: Intrallect Ltd > X-Mailer: Sylpheed version 0.8.5 (GTK+ 1.2.10; i686-pc-linux-gnu) > Mime-Version: 1.0 > Content-Type: text/plain; charset="us-ascii" > Content-Transfer-Encoding: 7bit > Return-Path: [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
mySQL 4 - FullText searching syntax?
Hello, I am evaluating mySQL 4.0.1-alpha on Redhat Linux 7.2 (RPM version). I am playing with the new fulltext search features and I have a question regarding the syntax... I have created a fulltext index on a field 'Notes'. I'd like to search for records that have words starting with "appartemen" in them, but NOT words starting with "lux", and neither with "prop". So I thought this would do the trick: <-- snip --> select BienID from biens where MATCH(Notes) AGAINST('+appartemen* -lux* -prop*' IN BOOLEAN MODE) <-- snip --> This does not produce the correct result, whereas this does: <-- snip --> select BienID from biens where MATCH(Notes) AGAINST('appartemen*' IN BOOLEAN MODE) AND NOT MATCH(Notes) AGAINST('lux*' IN BOOLEAN MODE) AND NOT MATCH(Notes) AGAINST('prop*' IN BOOLEAN MODE) <-- snip --> What have I understood wrong? --- Alain Fontaine Consultant & Developer VAlain S.A. Tél: +32-4-2522950 --- - 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: long query on php
Have you tried just putting the querys into a variable and pass the var along to mysql_query() ? Did it not work? --- Alain Fontaine Consultant & Developer VAlain S.A. Tel: +32-4-2522950 --- -Original Message- From: savaidis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 06, 2002 8:14 PM To: MySQL list (E-mail) Subject: long query on php How is possible to pass a long query to MySQL server with php? I mean i.e a "create table" statement with more than 400 chars. Have I to use shorter "create" and then "alter"? Thanks Makis - 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: dumping between tables?
Hello Paul, Why don't you just use mysqldump to dump the data to a textfile, and then insert the data from the textfile into your new table? --- Alain Fontaine Consultant & Developer VAlain S.A. Tel: +32-4-2522950 --- -Original Message- From: Paul Reilly [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 1:20 PM To: [EMAIL PROTECTED] Subject: dumping between tables? Re: sql query Hi, I want to dump the contents of one table in to another table which has the same structure in MySQL, with just one column type changed from VARCHAR to TEXT. Whats the best way to do this? Paul - 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: dumping between tables?
Paul, RTFM : http://www.mysql.com/doc/I/N/INSERT_SELECT.html [quote] INSERT [LOW_PRIORITY] [IGNORE] [INTO] tbl_name [(column list)] SELECT ... With INSERT ... SELECT statement you can quickly insert many rows into a table from one or many tables. INSERT INTO tblTemp2 (fldID) SELECT tblTemp1.fldOrder_ID FROM tblTemp1 WHERE tblTemp1.fldOrder_ID > 100; . . [/quote] --- Alain Fontaine Consultant & Developer VAlain S.A. Tel: +32-4-2522950 --- -Original Message- From: Paul Reilly [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 1:54 PM To: [EMAIL PROTECTED] Subject: Re: dumping between tables? > > I want to dump the contents of one table in to another table > > which has the same structure in MySQL, with just one column type changed > > from VARCHAR to TEXT. Whats the best way to do this? > > > Would INSERT...SELECT suit you? > =dn > > Yes, but it's a big table. Is there a way to do this nicely? ie, something like SELECT * from | INSERT - INTO ?? I was considerign using mysqldump, but I only want to reload one table in a database, and I'm not sure the mysqldump syntax for specific tables. Thanks Paul - 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: Extracting fields from a table
Hi, Using PHP? If so, this works quite nicely if you pass your dates as unix timestamps: SELECT * FROM table WHERE (FROM_UNIXTIME($theMaxTime) > col AND FROM_UNIXTIME($theMinTime) < col) In other words, "col" needs to be between $theMinTime and $theMaxTime as in $theMinTime < col < $theMaxTime. Is that what you need? It works the same way if you don't use timestamps, by the way. timestamps are just more convenient ;) --- Alain Fontaine Consultant & Developer VAlain S.A. Tél: +32-4-2522950 --- -Original Message- From: Victoria Reznichenko [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 2:08 PM To: [EMAIL PROTECTED] Subject: Extracting fields from a table Claire, Thursday, February 07, 2002, 12:35:07 AM, you wrote: CF> I want to select all entries in my table that in a column with given CF> dates findes all dates inbetween $from_date - $to_date. (These are CF> vars that the user supplies from the HTML-page). I don't know how to set CF> up the SELECT query. I tried the following way but it didn't work: CF> SELECT * FROM table WHERE (col=$from_date - col=$to_date) CF> What is the correct way? You can use TO_DAYS() function, look at: http://www.mysql.com/doc/D/a/Date_and_time_functions.html You can refer to: http://www.mysql.com/doc/C/o/Comparison_Operators.html -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.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 - 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 4 - FullText searching syntax?
Hello, I am evaluating mySQL 4.0.1-alpha on Redhat Linux 7.2 (RPM version). I am playing with the new fulltext search features and I have a question regarding the syntax... I have created a fulltext index on a field 'Notes'. I'd like to search for records that have words starting with "appartemen" in them, but NOT words starting with "lux", and neither with "prop". So I thought this would do the trick: <-- snip --> select BienID from biens where MATCH(Notes) AGAINST('+appartemen* -lux* -prop*' IN BOOLEAN MODE) <-- snip --> This does not produce the correct result, whereas this does: <-- snip --> select BienID from biens where MATCH(Notes) AGAINST('appartemen*' IN BOOLEAN MODE) AND NOT MATCH(Notes) AGAINST('lux*' IN BOOLEAN MODE) AND NOT MATCH(Notes) AGAINST('prop*' IN BOOLEAN MODE) <-- snip --> What have I understood wrong? --- Alain Fontaine Consultant & Developer VAlain S.A. Tél: +32-4-2522950 --- - 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: dumping between tables?
Paul, RTFM : http://www.mysql.com/doc/I/N/INSERT_SELECT.html [quote] INSERT [LOW_PRIORITY] [IGNORE] [INTO] tbl_name [(column list)] SELECT ... With INSERT ... SELECT statement you can quickly insert many rows into a table from one or many tables. INSERT INTO tblTemp2 (fldID) SELECT tblTemp1.fldOrder_ID FROM tblTemp1 WHERE tblTemp1.fldOrder_ID > 100; - 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: dumping between tables?
Hello Paul, Why don't you just use mysqldump to dump the data to a textfile, and then insert the data from the textfile into your new table? --- Alain Fontaine Consultant & Developer VAlain S.A. Tel: +32-4-2522950 --- -Original Message- From: Paul Reilly [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 1:20 PM To: [EMAIL PROTECTED] Subject: dumping between tables? Re: sql query Hi, I want to dump the contents of one table in to another table which has the same structure in MySQL, with just one column type changed from VARCHAR to TEXT. Whats the best way to do this? Paul - 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: long query on php
Have you tried just putting the querys into a variable and pass the var along to mysql_query() ? Did it not work? --- Alain Fontaine Consultant & Developer VAlain S.A. Tel: +32-4-2522950 --- -Original Message- From: savaidis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 06, 2002 8:14 PM To: MySQL list (E-mail) Subject: long query on php How is possible to pass a long query to MySQL server with php? I mean i.e a "create table" statement with more than 400 chars. Have I to use shorter "create" and then "alter"? Thanks Makis - 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: Extracting fields from a table
Hi, Using PHP? If so, this works quite nicely if you pass your dates as unix timestamps: SELECT * FROM table WHERE (FROM_UNIXTIME($theMaxTime) > col AND FROM_UNIXTIME($theMinTime) < col) In other words, "col" needs to be between $theMinTime and $theMaxTime as in $theMinTime < col < $theMaxTime. Is that what you need? It works the same way if you don't use timestamps, by the way. timestamps are just more convenient ;) --- Alain Fontaine Consultant & Developer VAlain S.A. Tél: +32-4-2522950 --- -Original Message- From: Victoria Reznichenko [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 2:08 PM To: [EMAIL PROTECTED] Subject: Extracting fields from a table Claire, Thursday, February 07, 2002, 12:35:07 AM, you wrote: CF> I want to select all entries in my table that in a column with given CF> dates findes all dates inbetween $from_date - $to_date. (These are CF> vars that the user supplies from the HTML-page). I don't know how to set CF> up the SELECT query. I tried the following way but it didn't work: CF> SELECT * FROM table WHERE (col=$from_date - col=$to_date) CF> What is the correct way? You can use TO_DAYS() function, look at: http://www.mysql.com/doc/D/a/Date_and_time_functions.html You can refer to: http://www.mysql.com/doc/C/o/Comparison_Operators.html -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.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 - 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