RE: Order by on Alphnumeric

2002-02-27 Thread Daniel Rosher
select * from table where strcol REGEXP ^[[:digit:]]+$ order by strcol Regards Dan -Original Message- From: Prospect'In [mailto:[EMAIL PROTECTED]] Sent: Thursday, 28 February 2002 11:31 a.m. To: [EMAIL PROTECTED] Subject: Order by on Alphnumeric sql,query Good

RE: ignore words in full text indexes

2002-02-27 Thread Daniel Rosher
David, I think the nominal minimum word length is 4 so 'fiat' will not be indexed. This can be modified however. regards, Dan -Original Message- From: David yahoo [mailto:[EMAIL PROTECTED]] Sent: Thursday, 28 February 2002 12:28 p.m. To: [EMAIL PROTECTED] Subject: ignore words in

RE: Can somebody help me with round (columna,columnb) ?

2002-02-26 Thread Daniel Rosher
Perhaps this is something like what your looking for? select substring(round(number,digits) ,1,instr(round(number,digits),'.')+digits) as roundednumber,digits,number from testme Regards, Dan -Original Message- From: DL Neil [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 27 February

RE: SET field=field+1 no longer works?

2002-02-26 Thread Daniel Rosher
Have privileges changed? Dan -Original Message- From: Tyler Longren [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 27 February 2002 11:55 a.m. To: DL Neil Cc: MySQL List Subject: Re: SET field=field+1 no longer works? Well, here's the query that PHP is generating: UPDATE users

RE: Combining two similar queries?

2002-02-26 Thread Daniel Rosher
You could create a table that is the combination of manufacturer and products table, with identical column and key information as the custom table -- call this say manprod table, then create a merge table from the manprod and custom table, and run one select query against the newly created merge

RE: MySQL php - assigning date variables

2002-02-25 Thread Daniel Rosher
SQL statement are: What is proper way to define a variable to include all dates newer than 1995-01-01? $query = ??? select * from table where date '1995-01-01' What is proper way to define a variable to include all dates older than 1995-01-01? $query = ??? select * from table where

RE: Beginner needs help

2002-02-25 Thread Daniel Rosher
Change it to INSERT into book( isbn, title, authlname, authfname, publisher, pubdate, dewey, lcnum ) values ( '1-56592-434-7', 'MySQL mSQL', 'Yarger', 'Randy Jay', O'Reilly, null, null, null ),

RE: any way to do this with SQL ???

2002-02-25 Thread Daniel Rosher
what about RENAME current_table temp_table CREATE TABLE current_table (identical create_definition to current_table except adding the datetime column type) select * from temp_table checking here DROP TABLE temp_table Regards, Dan -Original Message- From: Laszlo G. Szijarto

RE: help with big table search

2002-02-24 Thread Daniel Rosher
Jamie, I think your approach of a cross-reference table is a good start. This is similar to creating a stemming index. Perhaps you might like to look into, for example, some perl Modules for stemming (like Linga::Stem) to further reduce your data space. Perhaps since there may be a large

RE: Can I do it with single query in mysql?

2002-02-21 Thread Daniel Rosher
If you only interested in getting the overall sum from the child tables you could try the following: 1) Change your child create statements to: CREATE TABLE child1 ( auto_nr int(11) unsigned zerofill NOT NULL, link int(11) unsigned , value int(11), PRIMARY KEY auto_nr(auto_nr), KEY

RE: SQL query

2002-02-21 Thread Daniel Rosher
I presuming you are expecting more results from the first select statement, hence the reason and indicating this in the second, should then your first statement be: select edate from traffic where year(edate)='2001' group by edate; ? Regards, Dan -Original Message- From: [EMAIL

RE: SQL query

2002-02-21 Thread Daniel Rosher
it? R.B.Roa Traffic Management Engineer PhilCom Corporation Tel.No. (088) 858-1028 Mobile No. (0919) 30856267 -Original Message- From: Daniel Rosher [SMTP:[EMAIL PROTECTED]] Sent: Friday, February 22, 2002 11:15 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED

RE: insert select in ONE statement?

2002-02-20 Thread Daniel Rosher
use LAST_INSERT_ID() to get the last inserted id http://www.mysql.com/doc/G/e/Getting_unique_ID.html and 'The most recently generated ID is maintained in the server on a per-connection basis. It will not be changed by another client. It will not even be changed if you update another

RE: MYSQL HELP

2002-02-20 Thread Daniel Rosher
You can also try: Select SUBSTRING( MAX( CONCAT(LPAD(calltime,6,'0'),finishcode) ), 7) AS finishcode, 0+LEFT( MAX( CONCAT(LPAD(calltime,6,'0'),finishcode )), 6) AS calltime From callhistory As H,calllist As L where H.rowid = L.rowid group by H.rowid This is from:

RE: [PHP] MySQL question...not sure if this is the correct forum to ask.

2002-02-14 Thread Daniel Rosher
What about REPLACE? http://www.mysql.com/doc/R/E/REPLACE.html 'REPLACE works exactly like INSERT, except that if an old record in the table has the same value as a new record on a unique index, the old record is deleted before the new record is inserted' Regards, Dan -Original

RE: how do you increment a field on the fly?

2002-02-14 Thread Daniel Rosher
David, try 1) create temporary table x (a INT PRIMARY KEY AUTO_INCREMENT) [select_statement] where [select_statement] is some legal select statement, presumebly select g.Description,sum(i.Retail_Value) from Groups g, Item i where i.Group_ID =g.Group_ID and i.Group_ID 0 group by i.Group_ID

RE: data type bigint(20)

2002-02-14 Thread Daniel Rosher
http://www.mysql.com/doc/N/u/Numeric_types.html 20 is the display width: 'for a column declared as INT(5) ZEROFILL, a value of 4 is retrieved as 4' Regards Dan -Original Message- From: John D. Kirkpatrick [mailto:[EMAIL PROTECTED]] Sent: Friday, 15 February 2002 12:27 p.m. To:

RE: How to connect in non-interactive mode

2002-02-13 Thread Daniel Rosher
on that client connection). So... if there is a way to set the interactive_timeout to infinite, that would be most handy. Regards, Becky Daniel Rosher wrote: If you set the interactive_timeout to infinite then no clients will get disconnected until the server is restarted. I know the perl DBI

RE: long query on php

2002-02-13 Thread Daniel Rosher
This may be due to 'max_allowed_packet' size ... have a look at http://www.mysql.com/doc/P/a/Packet_too_large.html This is configurable Regards, Dan. -Original Message- From: Alain Fontaine - Consultant and developer [mailto:[EMAIL PROTECTED]] Sent: Friday, 8 February 2002 1:30

RE: error messages

2002-02-13 Thread Daniel Rosher
http://www.mysql.com/doc/p/e/perror.html use perror to get more information: Error code 2: No such file or directory Regards, Dan -Original Message- From: user lacko [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 12 February 2002 4:15 a.m. To: MYSQL Subject: error messages

RE: Columns

2002-02-13 Thread Daniel Rosher
Try 1) create table c as select a,b as b1,b as b2 ... from a 2) drop a; 3) alter table c rename to a; Instead of 2) you can rename the table and drop later, or tar-up the .MYI,.MYD and .frm files for the table before doing the above. Regards, Dan -Original Message- From: Keith A.

RE: How to connect in non-interactive mode

2002-02-11 Thread Daniel Rosher
If you set the interactive_timeout to infinite then no clients will get disconnected until the server is restarted. I know the perl DBI allows for a client to implement ping ($dbh-ping) ... this will reset the timeout for that particular client, allow the client to check for connectivity, without

RE: Duplicate Records

2002-02-10 Thread Daniel Rosher
You can do the following to remove duplicates: - create table foo as select distinct cols from table_name_containing_duplicates; - drop table_name_containing_duplicates; - alter table foo rename to table_name_containing_duplicates; Done. Now, make a primay key for the new table!! -- this will

RE: Error 13

2002-01-09 Thread Daniel Rosher
From the Manual (21.11 Problems with File Permissions) By default MySQL will create database and RAID directories with permission type 0700. You can modify this behavior by setting the UMASK_DIR variable. If you set this, new directories are created with the combined UMASK and UMASK_DIR. For