Re: select between date

2006-08-29 Thread Douglas Sims
You have a table containing birthdates (date field, including year) and you want to display all rows for which the birthday will occur in the next week (seven days). You tried this query: SELECT a017namaper, DATE_FORMAT(a017tkhlahir, '%e/%c/%Y') as a017tkhlahir, MONTH(a017tkhlahir) as bul

Re: SOS

2006-08-29 Thread Chris
李彦 wrote: Dear Sir: I have some problems with mysql 5.0 binary source in Linux(RedHat).I'm able to startup the mysql process. But when i type in :mysql -u root -h localhost -p, and then put the correct password, I can not enter the database. I took almost one week to dea

Re: select between date

2006-08-29 Thread Penduga Arus
On 8/3/06, Penduga Arus <[EMAIL PROTECTED]> wrote: On 8/1/06, Chris <[EMAIL PROTECTED]> wrote: > Did you look at the link David sent you? > > http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html thanks.. I manage to do that.. below is my solution. please advice if there is any bet

SOS

2006-08-29 Thread 李彦
Dear Sir: I have some problems with mysql 5.0 binary source in Linux(RedHat).I'm able to startup the mysql process. But when i type in :mysql -u root -h localhost -p, and then put the correct password, I can not enter the database. I took almost one week to deal with this

Re: Zip Code & Distance

2006-08-29 Thread barney
Jesse, Back around 1995-1996 I built a VB app with an Access database that would do much of what you want - it was for shipping and terminal locations - then ported it over to ASP & SQL Server a year or two later. I found several raw data files, either CSV or TSV, which were pretty easily impo

RE: Zip Code & Distance

2006-08-29 Thread Jerry Schwartz
That (using the zip code digits) won't work. Zip codes are assigned by population density, not by distance. A big city might have several zip codes, although they'd all likely have the same first three digits, but check Manhattan for an example. In our area, the core city (Hartford) and some of it

Re: Zip Code & Distance

2006-08-29 Thread Gmail User
On Tue, 2006-08-29 at 16:30 -0400, Jesse wrote: > Does anyone have any ideas? One technique is to calculate set distances (5,10,25,50) between the zip codes in advance and stick the results in a table. Enjoy, Ed -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql T

Re: Zip Code & Distance

2006-08-29 Thread Chris W
Jesse wrote: This is not necessarily SQL Specific, but it will impact my MySQL application. Using the zip code, how can you determine what's in a (say) 50 mile radius. In other words, if I'm looking for schools within a 50 mile radius of my location (Zip Code 33881), How can I determine this

Re: Zip Code & Distance

2006-08-29 Thread Greg Donald
On 8/29/06, Jesse <[EMAIL PROTECTED]> wrote: This is not necessarily SQL Specific, but it will impact my MySQL application. Using the zip code, how can you determine what's in a (say) 50 mile radius. In other words, if I'm looking for schools within a 50 mile radius of my location (Zip Code 3388

Re: Zip Code & Distance

2006-08-29 Thread Philip Hallstrom
This is not necessarily SQL Specific, but it will impact my MySQL application. Using the zip code, how can you determine what's in a (say) 50 mile radius. In other words, if I'm looking for schools within a 50 mile radius of my location (Zip Code 33881), How can I determine this by the zip cod

Zip Code & Distance

2006-08-29 Thread Jesse
This is not necessarily SQL Specific, but it will impact my MySQL application. Using the zip code, how can you determine what's in a (say) 50 mile radius. In other words, if I'm looking for schools within a 50 mile radius of my location (Zip Code 33881), How can I determine this by the zip cod

Re: Doing sum's if certain conditions are true

2006-08-29 Thread Visolve DB TEAM
Hello Ian barnes I hope this query will resolve your problem if my understanding is correct SELECT code1, SUM(bytes) as sumofbytes, MAX(bytes) as maximum, MIN(bytes) as minimum, COUNT(bytes) as bytecount, SUM(duration) as duration, AVG(bytes) as averagebyte FROM mytable where code1<>'none' and

Re: [PHP] switch()

2006-08-29 Thread John Meyer
[EMAIL PROTECTED] wrote: Why do you want to use a switch in this particular instance. You're comparing apples and oranges (in this case, col_1 and col_2). You use swithc to evaluate one variable against a number of choice, not multiple variables against variable choices. I'm not compari

Re: data time wrong format between mysql 5.01 and visual.net

2006-08-29 Thread Jo�o C�ndido de Souza Neto
You tried the date_format function of mysql? ""Roberto William Aranda-W Roman"" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] hello i'm developing a program on visual.net 2003 where i need to extract data from a date time format column working with mysql.net component for ex

Re: [PHP] switch()

2006-08-29 Thread afan
> Why do you want to use a switch in this particular instance. You're > comparing apples and oranges (in this case, col_1 and col_2). You use > swithc to evaluate one variable against a number of choice, not multiple > variables against variable choices. > I'm not comparing apples and oranges -

RE: Performance: LIMIT 1 with UPDATE

2006-08-29 Thread Robert DiFalco
Yeah, seems like for a uniquely index column expression that the LIMIT 1 provides no benefit (which seems like a logical conclusion). The performance on a large data set with both approaches is close enough to call equivalent. -Original Message- From: Rick James [mailto:[EMAIL PROTECTED]

RE: Performance: LIMIT 1 with UPDATE

2006-08-29 Thread Rick James
Maybe it is the tiny extra time to parse the unnecessary " LIMIT 1"? > -Original Message- > From: Robert DiFalco [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 29, 2006 10:09 AM > To: mysql@lists.mysql.com; [EMAIL PROTECTED] > Subject: RE: Performance: LIMIT 1 with UPDATE > > FWIW, m

Re: [PHP] switch()

2006-08-29 Thread John Meyer
[EMAIL PROTECTED] wrote: I have something like this: when I tried to use swiitch() it will give me only the first true case. if $result['col_1'] == 'value_1' is true 2nd case will never be executed? Does it mean I CANNOT use switch() in this case? -afan Why do you want to use a switch i

data time wrong format between mysql 5.01 and visual.net

2006-08-29 Thread Roberto William Aranda-W Roman
hello i'm developing a program on visual.net 2003 where i need to extract data from a date time format column working with mysql.net component for extract via mysqlcommands and dataadapters im fillin datagrills but the column displayed only presents the date but not the time im still analiz

table sizes, rolling data.

2006-08-29 Thread Tanner Postert
sorry for the double post. if i want to have a row of about 100 records. and everytime i insert a new record, it gets pushed on the top, and the bottom one gets pushed out, sort of like a heap. is this possible? i know i can just delete the record, etc, but i was wondering if there was a built i

table sizes, rolling data.

2006-08-29 Thread Tanner Postert

RE: Performance: LIMIT 1 with UPDATE

2006-08-29 Thread Robert DiFalco
FWIW, my preliminary testing shows no performance increase for adding LIMIT 1 to the following construct: [ SELECT | UPDATE ] WHERE Table.UniqueID = In fact, there seems to be a slight performance edge to NOT appending LIMIT 1 to the statement. R. -Original Message- Fro

Performance: LIMIT 1 with UPDATE

2006-08-29 Thread Robert DiFalco
Does using LIMIT 1 with UPDATE provide a performance improvement when the WHERE condition is on a unique index or primary key? R. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Anyone tried solidDB for MySQL?

2006-08-29 Thread Peter Rosenthal
http://www.solidtech.com/en/carrier-grade/index.asp http://dev.soliddb.com/en/index.php On 29/08/06, Ratheesh K J <[EMAIL PROTECTED]> wrote: What is this solidDB? where can i get much info on this?? Thanks, Ratheesh Bhat K J

Re: How to deal with summary data and reports

2006-08-29 Thread Aleksandar Ivanisevic
Matthew Wilson writes: [...] >I suspect this is a universal problem. All general advice would be >appreciated. Perhaps a stored procedure is not the way to go. Mysql 5.1 has CREATE EVENT, that somewhat mimics Oracle's jobs. I prefer to run a shell script in a cron job, like this: #!/bin/bas

How to deal with summary data and reports

2006-08-29 Thread Matthew Wilson
I wrote a fairly large query that summarizes our sales into monthly totals by business unit, then left joins on some other information from a bunch of other tables. Running the query takes a long time. I'm considering whether to store my summary data as a table, like this: create table monthly_t

RE: Doing sum's if certain conditions are true

2006-08-29 Thread Jay Blanchard
[snip] +---+--+---+-+-- +-+ | code | bin | min | ain | cin | dur | +---+--+---+-+-- +-+ |

Doing sum's if certain conditions are true

2006-08-29 Thread Ian Barnes
Hi, I am trying to build a query that does a sum if a certain parameter is set. For example: I have a row with four fields: code1, code2, duration and bytes. My current query looks something like this: SELECT code1 as code, sum(bytes) as bin, max(bytes) as min, avg(bytes) as ain, count(bytes) as

Re: MySQL 5.1

2006-08-29 Thread Jacques Marneweck
Logan, David (SST - Adelaide) wrote: Hi Folks, Does anybody have any idea when 5.1 may come to General Release? I am particularly interested in MySQL Cluster as I have several databases (around 50) totalling 26Gb and would like to consider moving to this version because of the Cluster Disk Dat

replication breaks

2006-08-29 Thread Pooly
Hi, I recently upgrade our master to MySQL 5.0.24. But, I changed on option to log_bin=server-log-bin, as a result the binary log has changed from server-bin.000228 to server-log-bin.01... So now, the slave throw me an "could not find first log file in binary log index". I suppose I have to d