order desc problem

2006-07-09 Thread M B Neretlis
the order comes out of sequence showing 10.11.12.13 etc before the number 2--- Can anyone help me out ?php //get user tips $query = @mysql_query(SELECT * FROM tips WHERE user_id = $user_id AND comp_id = $comp_id ORDER by round DESC); while ($result = @mysql_fetch_array($query)) { ?

Re: order desc problem

2006-07-09 Thread Aleksandar Bradaric
Hi, the order comes out of sequence showing 10.11.12.13 etc before the number 2--- Can anyone help me out That's because you are sorting the result on a string (char/varchar) column. Try using CAST to convert it to int or something similar: ORDER BY cast(column as unsigned) Best

Re: order desc problem

2006-07-09 Thread Chris Sansom
At 20:27 +0800 9/7/06, M B Neretlis wrote: the order comes out of sequence showing 10.11.12.13 etc before the number 2--- Can anyone help me out ?php //get user tips $query = @mysql_query(SELECT * FROM tips WHERE user_id = $user_id AND comp_id = $comp_id ORDER by round DESC); while

a lil sql help please.

2006-07-09 Thread m i l e s
Hi, I have the following Query and Im a lil lost on this one SELECT DISTINCT tbe_orders.order_id, tbe_orders.order_date, tbe_orders.order_piececount FROM tbe_orders The query produces the following results: +++ + order_id + order_date +

Re: a lil sql help please.

2006-07-09 Thread Davor Dundovic
At 18:51 9.7.2006, you wrote: Hi, I have the following Query and Im a lil lost on this one SELECT DISTINCT tbe_orders.order_id, tbe_orders.order_date, tbe_orders.order_piececount FROM tbe_orders SELECT tbe_orders.order_id, tbe_orders.order_date, sum(tbe_orders.order_piececount) FROM

Re: a lil sql help please.

2006-07-09 Thread John L Meyer
m i l e s wrote: Hi, I have the following Query and Im a lil lost on this one SELECT DISTINCT tbe_orders.order_id, tbe_orders.order_date, tbe_orders.order_piececount FROM tbe_orders The query produces the following results: +++ + order_id +

How to look for balanced parenthesis?

2006-07-09 Thread mos
I have a complicated SQL statement with around a dozen if(this,val1,val2) embedded in it and there are even nested If clauses. I'm getting syntax errors because I'm not balancing the ( ) properly. Is there any free software out there for Windows that I can copy and paste the SQL statement into

Re: How to look for balanced parenthesis?

2006-07-09 Thread Rhino
- Original Message - From: mos [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Sunday, July 09, 2006 1:35 PM Subject: How to look for balanced parenthesis? I have a complicated SQL statement with around a dozen if(this,val1,val2) embedded in it and there are even nested If

very basic questions

2006-07-09 Thread Jhst463
Hello, I'm new to MySQL and SQL have some very basic questions about them. I'm relatively competant in programming, so maybe if someone could answer ... 1. Are SQL files, eg. foo.sql, referred to as scripts or programs or what. (In searching for answers to 2. below and don't know if I'm

Re: very basic questions

2006-07-09 Thread Jo�o C�ndido de Souza Neto
SQL files are just text files that has sql commands in. If you want to load a sql file from mysql prompt you can do like this. mysql -u root -p mysql mysql load file.sql; It's better to remember you that you'll have to be in the folder where the file.sql is before call the mysql prompt. Hope

Re: very basic questions

2006-07-09 Thread Martin Jespersen
1: .sql files are usually textfiles with sql statements in them delimited by ; 2: do the following 1) start the client - /path/to/mysql -u user -ppass 2) select your database (if nescessary) - use db 3) import the sql file - source /path/to/fill_help_tables.sql [EMAIL PROTECTED] wrote:

Re: How to look for balanced parenthesis?

2006-07-09 Thread Miles Thompson
At 02:35 PM 7/9/2006, mos wrote: I have a complicated SQL statement with around a dozen if(this,val1,val2) embedded in it and there are even nested If clauses. I'm getting syntax errors because I'm not balancing the ( ) properly. Is there any free software out there for Windows that I can

Re: How to look for balanced parenthesis?

2006-07-09 Thread Miles Thompson
At 03:48 PM 7/9/2006, Rhino wrote: - Original Message - From: mos [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Sunday, July 09, 2006 1:35 PM Subject: How to look for balanced parenthesis? I have a complicated SQL statement with around a dozen if(this,val1,val2) embedded in it

Re: Cumulative Totals

2006-07-09 Thread Frederik Eaton
From this discussion, I'm assuming that there is no support for a cumulative total index, is this correct? In other words, I'm looking for an index which lets me query a cumulative sum of a column in constant time, and which lets me find a row which has for instance the smallest cumulative sum

Re: How to look for balanced parenthesis?

2006-07-09 Thread mos
At 01:48 PM 7/9/2006, you wrote: - Original Message - From: mos [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Sunday, July 09, 2006 1:35 PM Subject: How to look for balanced parenthesis? I have a complicated SQL statement with around a dozen if(this,val1,val2) embedded in it and

How does one speed up delete-Again

2006-07-09 Thread Jacob, Raymond A Jr
I started the operation below on Friday at 1300hrs EST DELETE data FROM data, event WHERE data.cid = event.cid AND event.timestamp 2006-05-01 It is now Sunday 22:00hrs EST and the operation is still running. Question: Should it take this long to delete 7.5 million records from a 4.5GB

Re: mysqldump - dump file per table?

2006-07-09 Thread Greg 'groggy' Lehey
On Friday, 7 July 2006 at 14:53:11 -0500, Dan Buettner wrote: I'm preparing to implement some mysqldump-based backups, and would really like to find an easy way to dump out one SQL file per table, rather than single massive SQL file with all tables from all databases. In other words, if I

Re: PHP connects in Latin1 when it should do it in UTF-8

2006-07-09 Thread Santiago del Castillo
Hi, i fixed it with this: [mysqld] init-connect='SET NAMES utf8' And now works like a charm :) Your solution it's the right one for you because you have databases in different encodings, Since i don't, i didn't wanted to do extra queries to the DB. In fact, that solution is the one i was using

May I create more than 200 databases for one mysqld?

2006-07-09 Thread 古雷
May I create more than 200 databases for one mysqld? And is there any disadvantage when there're many databases on one mysqld? Thanks. Regards, Gu Lei

RE: May I create more than 200 databases for one mysqld?

2006-07-09 Thread paul rivers
Yes, you can. Whether there are disadvantages depends mainly on how you are using mysql. When there are many databases (an order of magnitude or more than what you propose), some people report that show databases can be slow. Otherwise, the disadvantages are mainly administrative. For

Benchmarking GUI tool

2006-07-09 Thread Michael Louie Loria
Hello, Does anybody know a Benchmarking GUI tool for MySQL under windows? Thanks, Mic signature.asc Description: OpenPGP digital signature

EINTR in my_connect()

2006-07-09 Thread Batara Kesuma
Hi all, Is there any reason to abort connection when error code is EINTR? I tried to patch it as below: --- [EMAIL PROTECTED]:~/src/mysql-5.0.22/libmysqld]$ diff -c client.c client.c.patch *** client.c2006-07-10 12:24:52.0 +0900 --- client.c.patch 2006-07-10