Michael Stassen <[EMAIL PROTECTED]> writes:
>> Scott Gifford wrote:
[...]
>>>Try something like this:
>>>
>>> select * from price where amount > 3.44 and amount <= 3.46
>
> I hope the "<=" was a typo?
Yes.
Scott.
--
MySQ
Jerry Swanson <[EMAIL PROTECTED]> writes:
> Why when I do select from database and try to compare float field with float
> number, I have no results
>
> amount --- type float
>
> select * from price where amount = 3.45 // doesn't work
> select * from price where amount = '3.45' //doesn't work
Flo
[EMAIL PROTECTED] writes:
[...]
> Your application will still need access to the data it gets from
> MySQL so changing your MySQL permissions doesn't make any sense,
> does it. It's your application that needs to say "no" to the
> user. You don't want MySQL saying "no" to your application. Do you
[EMAIL PROTECTED] writes:
> Is it possible for a MySQL connection to request a downgrade in
> privileges? What I'd like to be able to do is create one database
> user account for a database application with read and write
> privileges to the tables, but if an application user logs in who
> only h
Scott Klarenbach <[EMAIL PROTECTED]> writes:
> I'm using Mysql 5.0.7 and I've noticed the following very strange
> functionality, perhaps someone can shed some light on it for me.
Try using the "EXPLAIN" statement to get some insight into what MySQL
is thinking.
Scott.
--
MySQL General Mai
Ken Gieselman <[EMAIL PROTECTED]> writes:
[...]
> Yeah, that's my "fall-back" option -- though the thought of executing
> the query twice is a bit daunting. Some of the tables run into
> billions of rows per year (the merge tables anyhow, the data tables
> are broken down by month to keep them f
Ken Gieselman <[EMAIL PROTECTED]> writes:
[...]
> So, here's my question: How can I find out how many rows are being
> returned by a query, without using mysql_stmt_store_result() to
> buffer all the rows back to the client?
One straightforward way is to replace the SELECT clause with just
SELEC
Hello,
I'd like to sort my query results based on their distance from a given
point. The actual data I have will be in (longitude,latitude) format,
but I can convert to something else if that will work better.
For example, I may have data like this
Item Latitude Longitude
Keith Ivey <[EMAIL PROTECTED]> writes:
> Scott Gifford wrote:
>
>> SELECT COUNT(*) AS score FROM downloads WHERE dateline +
>> 3600 >= UNIX_TIMESTAMP() GROUP BY filename ORDER BY score DESC
>
> It would be better with
>
> WHERE dateline &g
Sebastian <[EMAIL PROTECTED]> writes:
> i have this query:
>
> SELECT COUNT(*) AS score FROM downloads WHERE date_add(dateline,
> interval 1 hour) >= now() GROUP BY filename ORDER BY score DESC
>
> unfortunately for other reasons i had to change `dateline` to unix
> timestamp so this query is no l
Scott Klarenbach <[EMAIL PROTECTED]> writes:
> Does MySQL 5 provide native XML support? ie, can I have a stored
> procedure return an XML string instead of a recordset? Can I pass in
> an XML string/doc and have the DB update relational tables based on
> it?
MyXML is supposed to help with this
Pat Adams <[EMAIL PROTECTED]> writes:
> On Thu, 2005-08-04 at 14:44 -0500, 2wsxdr5 wrote:
>> There are also several places that you can get a reasonably random
>> number for the seed from your machine. The amount of free disk space,
>> unless that doesn't change much on your machine. The amoun
Brian Dunning <[EMAIL PROTECTED]> writes:
> Dude, that's more than 5 years old.
Yup, but it's worked fine for every application I've used it for. ZIP
codes don't tend to get moved around very often, and when they do it's
not very far...
ScottG.
[...]
>> As I said below, you can download a
ger be updated, though, so the ZCTA data is
probably better.
ScottG.
[...]
> On Jun 26, 2005, at 6:43 PM, Scott Gifford wrote:
[...]
>> In the U.S., you can use the census data:
>>
>> http://www.census.gov/geo/www/gazetteer/places2k.html
--
MySQL General Mailing List
Jack Lauman <[EMAIL PROTECTED]> writes:
> A couple of months ago these was a discussion about ZIP code plotting
> on this list. Does anyone know how to calculate LONG/LAT coordinates
> from ZIP+4?
In the U.S., you can use the census data:
http://www.census.gov/geo/www/gazetteer/places2k.htm
Scott Gifford <[EMAIL PROTECTED]> writes:
[...]
> I think I'm going to take a look at the MySQL source and see if
> there's anything I can tweak to get the effect I want. I'll report
> back my results.
The MySQL source looked a bit too complex for casual hacki
Danny Stolle <[EMAIL PROTECTED]> writes:
[...]
> 3. Create multiple user IDs for each role played by each user
> (dannys_arch as an architect, dannys_dev as a developer).
An interesting argument in favor of the much maligned "option 3" is
that it allows users to select which of their privileges
"Jigal van Hemert" <[EMAIL PROTECTED]> writes:
> From: "Scott Gifford"
[...]
>> Right, ALL would be a great plan if it weren't for the LIMIT 1.
>
> The LIMIT 1 will be performed *after* the recordset is sorted :-(
Ah, I think that is the piece I
Thanks for your response, Jigal. More below...
"Jigal van Hemert" <[EMAIL PROTECTED]> writes:
> From: "Scott Gifford"
[...]
>> Apparently MySQL's optimizer sees that it can use the primary key for
>> mirealsource_home_supplemental to do th
I'm having a hard time figuring out why a query in my application is
slow. It seems that MySQL is using a filesort where it's not
necessary, and as a result a query that should be taking a fraction of
a second is taking up to 10 seconds.
Essentially, the query is doing a join of 4 tables, two of
[EMAIL PROTECTED] writes:
> You have a sort because you did an order by.
> If you had an index with the desired order by, it may be used.
> Try as you usage of covering indexes.
Hi Mathias,
Along with your suggestion, a little more thinking about the problem
and some experimenting seems to have
[EMAIL PROTECTED] writes:
> hi,
> mls_num is not in a key, have you tried index creation on (zip,price
> desc,mls_num) ?
Hi mathias,
mls_num is the primary key, so it does have its own index.
I could create a multi-column index covering (zip,price,mls_num), but
that was really just one example
Johan Höök <[EMAIL PROTECTED]> writes:
> Hi Scott,
> I think you've been lucky so far...
> As you're only ordering on listdate, which is the same
> for both homes in your example you might definitely get different
> results once you put in the limit.
> A basic thing about rdb's is that you must ne
Hello,
I have an application that does searches against a database of homes.
A summary of initial search results is displayed by showing a few
columns of information about each home. When the user clicks on one
of the listings, it retrieves additional information (some from other
tables) and disp
<[EMAIL PROTECTED]> writes:
[...]
> So what I am trying is this.
>
> $last_row ="SELECT from firebase_content LAST_INSERT_ID()";
> $last_row_query = $dbi->query($last_row);
> $last_row_result = $row->id;
LAST_INSERT_ID() only works if you just inserted an element; it's
maintained per-connection.
[EMAIL PROTECTED] writes:
> Frank Bax <[EMAIL PROTECTED]> wrote on 04/25/2005 11:47:12 AM:
>
>> At 10:44 AM 4/25/05, Art.M (Wikki) wrote:
>> >I have a large .sql file to upload which is about 9 mb and I was
>> >wondering if anyone knew of a program that could break it up into
>> >chunks of 2 mb or
Hello,
I'm having a problem with query running very slowly. I run similar
queries on other tables all the time that perform as expected, and
this query used to run fine until I removed an explicit LEFT JOIN and
let the optimizer decide in what order to join two of the tables.
That fixed some othe
Jeff Kolber <[EMAIL PROTECTED]> writes:
> How are sites doing the search by zip and coming up with results within x
> miles? Is there some OSS zip code download that has been created for this?
The ones I'm familiar with use this:
http://www.census.gov/geo/www/tiger/zip1999.html
[...]
> I
Scott Haneda <[EMAIL PROTECTED]> writes:
> How are sites doing the search by zip and coming up with results within x
> miles? Is there some OSS zip code download that has been created for this?
Zipdy does most of what you want; it needs to be modified to support
MySQL instead of PostgreSQL, but
Asma Aripin <[EMAIL PROTECTED]> writes:
> --
> I want to select 1 record from 200,000 rows of records. I use this SQL
> statement:
>
> SELECT password FROM TableUser WHERE username='jack00'
>
> It takes me about 20 seconds just to view the password.
>
> Is there any other way to decrea
I'm working on a search interface in MySQL for a series of items that
have titles and descriptions. I'd like to weight the results so that
matches in the title count for more than matches in the description.
Is there a recommended way of doing this?
So far, I've come up with three ways, two of w
"Craig Westerman" <[EMAIL PROTECTED]> writes:
> I'm needing counter for site that receives 80 to 120 hits a minute
> at peak load. Many I have tried cause excessive server load and need
> to be deactivated or they lose data and return to zero without
> warning. All tried so far have been written
Sorry, this came out ugly. I misinterpreted the list filter's
comments, and thought it would post my original message if I replied
to it, but instead it posted my reply including its warning.
Here's my original question, which is indeed about MySQL, although it
does not contain the words "SQL" o
rory oconnor <[EMAIL PROTECTED]> writes:
[...]
> each item in a cart is a record, so simply querying on records won't
> work. What I need to count is how many distinct customerId's there
> are. a sample from the table looks like:
>
> cartItemIdcustomerId productId
> 1944 244
I'm seeing queries a little bit slower than I'd like when I try to get
them in random order, by using ORDER BY RAND(). It seems like mysql
should be able to do this quickly, especially in the simple case of:
SELECT * FROM db ORDER BY RAND() LIMIT 1
, where it could choose a random number be
I'm a little bit confused about what EXPLAIN is saying about a query
I'm doing with an ORDER BY clause. I've read and re-read the parts of
the manual about how ORDER BY is optimized, but it won't sink in to my
thick skull for some reason.
I've got an index on a column called price, which is an I
36 matches
Mail list logo