BETWEEN, IN, >, < .... not using index with floats

2008-05-16 Thread Nacho Garcia
Hi, im working with google maps and im and trying to do this, but i cant make a good query of it. I want to select elements between a given latitude and longitude from this table: *CREATE TABLE `images` (* *`id_img` bigint(20) unsigned NOT NULL auto_increment,** **`filename` char(50) NOT NULL,**

Re: fetch floats/doubles in native binary representation

2006-05-26 Thread Jay Pipes
Andras Pal wrote: Hi, I've a large table with lots of floats (or doubles) that i want to query using C API. By default, in C, the rows are returned as a type of char **, therefore floating numbers are returned as ascii strings. Is it possible to fetch somehow directly these numbers in

fetch floats/doubles in native binary representation

2006-05-25 Thread Andras Pal
Hi, I've a large table with lots of floats (or doubles) that i want to query using C API. By default, in C, the rows are returned as a type of char **, therefore floating numbers are returned as ascii strings. Is it possible to fetch somehow directly these numbers in their original b

RE: Rounding floats

2002-10-23 Thread Jon Frisby
ECTED] > Subject: Re: Rounding floats > > > Oh, for BCD floating point. > My first computer with a language (SWTP 6800) had BCD math. > It had something like 6 byte mantissa and a 1 byte exponent. > That would give 11 digits with e +-99 > Maybe we should have BCD data t

Re: Rounding floats

2002-10-23 Thread gerald_clark
Oh, for BCD floating point. My first computer with a language (SWTP 6800) had BCD math. It had something like 6 byte mantissa and a 1 byte exponent. That would give 11 digits with e +-99 Maybe we should have BCD data types. Jan Steinman wrote: From: "Michael T. Babcock" <[EMAIL PROTECTED]> Kenne

Re: Rounding floats

2002-10-23 Thread Jan Steinman
>From: "Michael T. Babcock" <[EMAIL PROTECTED]> >Kenneth Hylton wrote something about SQL or QUERYs: >>I NEVER use float or double to store values like you appear to be doing... >FWIW, all of our financial database software stores values in either pennies or >tenths of a cent, not dollars, to avoi

Rounding floats

2002-10-23 Thread Michael T. Babcock
Kenneth Hylton wrote something about SQL or QUERYs: I NEVER use float or double to store values like you appear to be doing. I always used DECIMAL so that they are stored as strings and you do not have problems associated with what you see here. I then have complete control over what is stored

RE: Mysql arbitrarily rounds large floats

2002-10-22 Thread Kenneth Hylton
n Programmer Analyst IV LEC Systems & Programming Billing Concepts, Inc. 7411 John Smith Drive San Antonio, Texas 78229-4898 (210) 949-7261 -Original Message- From: Lonny Byrd [mailto:lonny@;bakecrafters.com] Sent: Tuesday, October 22, 2002 1:18 PM To: [EMAIL PROTECTED] Subject

Re: Mysql arbitrarily rounds large floats

2002-10-22 Thread gerald_clark
You have a bigger problem than that. All your 409s changed to 509s. Lonny Byrd wrote: Description: Mysql arbitrarily rounds large floats How-To-Repeat: create table temp ( id int unsigned not null auto_increment primary key, amount float(8,2) ); insert

Mysql arbitrarily rounds large floats

2002-10-22 Thread Lonny Byrd
Description: Mysql arbitrarily rounds large floats How-To-Repeat: create table temp ( id int unsigned not null auto_increment primary key, amount float(8,2) ); insert into temp(amount) values(244409.29); insert into temp(amount) values

Re: mysql_real_query, insert floats as binary

2002-07-02 Thread Roger Baklund
* Dave Beck > > ...and some bytes may represent an 'illegal' character, and thus must be > > escaped by a backslash... this goes for the quote character you > > use (" or '), the backslash character itself, and null bytes. > > Thanks, if I use mysql_real_query is this still the case? The doc's on

Re: mysql_real_query, insert floats as binary

2002-07-02 Thread Dave Beck
> ...and some bytes may represent an 'illegal' character, and thus must be > escaped by a backslash... this goes for the quote character you use (" or > '), the backslash character itself, and null bytes. Thanks, if I use mysql_real_query is this still the case? -- David A. C. Beck [EMAIL PROTEC

Re: mysql_real_query, insert floats as binary

2002-07-02 Thread Roger Baklund
* Dave Beck [...] > > charinsert_format[] = "INSERT INTO %s VALUES (%hhd%hhd%hhd%hhd, > > %hhd%hhd%hhd%hhd, %hhd%hhd%hhd%hhd, %hhd%hhd%hhd%hhd,%hhd%hhd%hhd%hhd)"; The values should be quoted... > > int build_real_insert(char *query, char *table, int frame, int > atom, float > > x, float

Re: mysql_real_query, insert floats as binary

2002-07-01 Thread Dave Beck
No takers? Any thoughts would be great. -- David A. C. Beck [EMAIL PROTECTED] Valerie Daggett Laboratory Biomolecular Structure and Design Program Department of Medicinal Chemistry University of Washington, Seattle On Thu, 27 Jun 2002, Dave Beck wrote: > the question: > > I am trying to use

mysql_real_query, insert floats as binary

2002-06-27 Thread Dave Beck
the question: I am trying to use the C API to insert floating (4 byte) point data into a mysql table. It is very desirable to put the data in as the binary representation and not as a sprintf family converted string (to maintain precision & improve performance). My initial attempt is below - pe

Re: Floats

2001-09-07 Thread Gerald Clark
wrote: > Hi List, > > I'm a little bit confused. > > I do the following: > > Create a table with 1 int and two floats. > > mysql> create table testfloat(z int, ll float, ul float); > Query OK, 0 rows affected (0.00 sec) > > inserting one row into th

Floats

2001-09-07 Thread Guddack Thorsten ICM MP SCM SCCM PI
Hi List, I'm a little bit confused. I do the following: Create a table with 1 int and two floats. mysql> create table testfloat(z int, ll float, ul float); Query OK, 0 rows affected (0.00 sec) inserting one row into the table mysql> insert into testfloat values