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)) {
?
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
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
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 +
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
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 +
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
- 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
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
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
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:
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
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
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
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
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
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
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?
And is there any disadvantage when there're many databases on one mysqld?
Thanks.
Regards,
Gu Lei
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
Hello,
Does anybody know a Benchmarking GUI tool for MySQL under windows?
Thanks,
Mic
signature.asc
Description: OpenPGP digital signature
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
22 matches
Mail list logo