Re: Optimize Table usage

2003-01-06 Thread Steve Yates
factor of using it on multiple tables. - Steve Yates - BUS STOP: Where the I/O gets off. ~ Taglines by Taglinator - www.srtware.com ~ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http:/

Re: Select Date Help

2003-01-02 Thread Steve Yates
On Thu, 2 Jan 2003 14:27:25 -0800, Max Clark wrote: >select * from table where date = '2003-01' aside from ...where (date>='2003-01-01' and date <= '2003-01-31') I think you could use ...where left(date,7) = '2003-01' http://www.mysql.com/doc/en/

Fwd: Re: RE: Trouble converting SQL from Access

2002-12-27 Thread Steve Yates
top of my head have you tried not calculating the order by field again? Something like: SELECT Dealers.*, POW((2285-Zips.North),2)+POW((4760-Zips.West),2) as L, SQRT(L) AS Distance FROM Dealers INNER JOIN Zips ON Dealers.Zip = Zips.Zip ORDER BY L (or should it be order by Distance?) - Steve

Re: Primary key question

2002-12-17 Thread Steve Yates
On Tue, 17 Dec 2002 19:15:08 +0100, Serrand Patrice wrote: >Does MySQL automatically create index on primary key ? Yes. See http://www.mysql.com/doc/en/CREATE_TABLE.html - Steve Yates - Antonym: The opposite of the word you're searching for. ~ Taglines by Taglinator - www.srt

Re: MySQL and PHP question

2002-12-17 Thread Steve Yates
from table1 where userid=$user1"? >$query "select number from table2 where userid=$user2"; >$result = mysql_query($query) or die("Query failed"); You re-used the same variable $result. Offhand I would try using a second variable, and/or using mysql_free_resul

Re: MySQL and PHP question

2002-12-17 Thread Steve Yates
On Wed, 18 Dec 2002 16:05:35 -0500, C. Reeve wrote: >I can not use two mysql queries in the same PHP file Please post code snippets, this is possible. - Steve Yates - Burger Borg: We do it our way; yours is irrelevant. ~ Taglines by Taglinator - www.srtware.

Re: Re: No descending index ?

2002-12-17 Thread Steve Yates
. - Steve Yates - Can't I have just a little bit of peril? ~ Taglines by Taglinator - www.srtware.com ~ sql,query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysq

Re: Fwd: Re: Bug in auto_increment

2002-12-16 Thread Steve Yates
provided value. http://www.mysql.com/doc/en/example-AUTO_INCREMENT.html - Steve Yates - Does "Microsoft" mean small and limp? ~ Taglines by Taglinator - www.srtware.com ~ - Before posting, please check: http://www

Re: Field type conversion question

2002-12-12 Thread Steve Yates
One approach is an EventAttendance table that has two fields (eventnum, employeenum). Then multiple employees can attend one event, and there are no long strings running around. - Steve Yates - If you smoke after sex, you're doing it too fast. ~ Taglines by T

Re: Questions Compressed Tables & Indexs

2002-12-05 Thread Steve Yates
l.com/doc/en/MySQL_indexes.html http://www.mysql.com/doc/en/Multiple-column_indexes.html - Steve Yates - When you're great people sometimes mistake candor for bragging. --Calvin ~ Taglines by Taglinator - www.srtware.com ~ ---

Re: import size

2002-12-05 Thread Steve Yates
found that using "i < 20" would result in a string that was too long. - Steve Yates - Between two evils, always pick the one you haven't tried. ~ Taglines by Taglinator - www.srtware.com ~ - Before posting,

Re: access->mysql

2002-12-04 Thread Steve Yates
e one could accomplish the same thing in Access natively but I'm far better versed in Delphi. One note...at least in Delphi, uploading from the desktop is FAR faster using a query and update/insert than using a table, especially since one can use multiple VALUES per INSERT query. - Steve Yat

Re: DateTime Calculations

2002-12-03 Thread Steve Yates
On Tue, 03 Dec 2002 10:45:57 -0600, Peter Abilla wrote: >(Column Two - Column One) = Total Minutes Assuming this doesn't work :) perhaps select UNIX_TIMESTAMP(col2) - UNIX_TIMESTAMP(col1) as TimeDiff This should give you an answer in seconds. [sql] - Steve Yates - File n

Re: Select, mysql_fetch_array, PHP question

2002-12-03 Thread Steve Yates
On Tue, 3 Dec 2002 08:38:59 -0500, Beauford.2003 wrote: > while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { > echo $item; } Try echo $line['item']; - Steve Yates - Any sufficiently advanced magic looks like technology. ~ Taglines by Taglinator -

Re: help with picking the right index(s)

2002-12-03 Thread Steve Yates
nd for reporting (a query for 2002/12/* would still use this index). - Steve Yates - Detour: The roughest distance between two points. ~ Taglines by Taglinator - www.srtware.com ~ - Before posting, please check: http://www.mys

Re: Front end for MySQL databases

2002-11-27 Thread Steve Yates
om the desktop is FAR faster using a TQuery and update/insert than using a TTable, especially using multiple VALUES per query. - Steve Yates - Patience: A virtue that carries a lot of wait. ~ Taglines by Taglinator - www.srtwa

Re: SQL Row Counting in MySQL

2002-11-26 Thread Steve Yates
On Tue, 26 Nov 2002 15:01:08 -, Tom Place wrote: >a simple way in MySQL to only select the first x rows See LIMIT: http://www.mysql.com/doc/en/SELECT.html - Steve Yates - If at first you don't succeed, then skydiving isn't for you. ~ Taglines by Taglinator - ww

question on optimizing complex query

2002-11-25 Thread Steve Yates
L from using an index? Or does it even matter with a table this size? For the record, it's the second table that has several thousand rows, and MySQL uses an index for that table in this query. - Steve Yates - if (stone != rolling) moss++; ~ Taglines by Taglinat