someone point me in the direction of the correct join to make this
happen.
--
---------
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailing Li
ogic to deal with cases where the second table has
never been inserted into, also when you wrap your record set, it will need
to be reset, but I think you get the idea.
--
-----
Scott HanedaTel: 415.898.2602
<h
id to get only one
record back.
I can script this, it is going to be slow, I would like to see how I can do
it in SQL.
thanks
--
-----
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com>
hanks for the pointers.
--
-
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailing List
For list archives: http://lists.mysql.c
command line and have it really stop
that query?
--
-
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailing List
For list archives
t;265","1424","1962","1131","528","643","6209","99502","61.096163",
"-150.093943"
Where everything is in quotes and comma sep
Can someone tell me, how to rapidly import all this data into
his case.
To do this at the application level is painfully slow, I can shove the data
into a temp table at get it pretty easy, but I thought there would be a
simple way.
--
---------
Scott HanedaTel: 415.898
796 |
| 94925 | 46 | 65 | 9.750440 |
+-+++--+
That gives me 15 rows, but I only need one, which would be the total of each
of the income level columns, distance is not important to me, that's the one
row I want back
--
-----
Scot
of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP
columns is illegal if there is no GROUP BY clause
--
-----
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato,
I need to update a column, if the string length is less than 5, I want to
add leading zeros to it until it has 5. These are zip codes, I think there
are no 00 leading zips, so most should all be four chars long.
--
-
Scott Haneda
How about
>
> UPDATE tbl_Name SET ZipCodes = right(concat('0',ZipCodes), 5) WHERE
> length(ZipCodes) < 5
Works, perfect, thanks to both of you.
--
-
Scott HanedaTel: 415.898.2602
to do this with
two separate datasets and shove this all back out a browser to the user.
thanks
--
-----
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
-
is closest, so I would like 5 back, but both are ok, as I can use server
side code to determine the closest.
--
-----
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S
; If I am looking for 6, it is not there, I want back 5 and 8, in this case, 5
> is closest, so I would like 5 back, but both are ok, as I can use server
> side code to determine the closest.
I am thinking UNION and two SQL queries would do this, how is UNION
optimized, is it more or less th
> OK, that's clear.
Sorry about the bervity, ill clear this up below.
> Scott Haneda wrote:
>> I am thinking UNION and two SQL queries would do this, how is UNION
>> optimized, is it more or less the same as running two selects?
>
> Usually, but a UNION of what two
me time, so I just ran the update
and all was well.
Thanks everyone.
--
-----
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailing Lis
st timestamp column will be ignored, but the first column will get
auto timestamp in a table that has more than one timestamp column.
I usually set up two, updated and added, and I always set the added field to
NOW()
It explains it pretty well in the docs here
http://dev.mysql.com/doc/refman/4.
requests from multiple threads much better.
Almost everything, they have not hit that capacity issue yet, they are all
generally much smaller that non SCSI.
--
-----
Scott HanedaTel: 415.8
in phpMyAdmin, so if anyone knows how to do it in
there, that would be nice as well.
Thanks.
--
-
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
lly block
> user_B from touching Orders_A
>
> Knowing how to do this the SQL way would help, ultimately, I have to show a
> client how to do this in phpMyAdmin, so if anyone knows how to do it in
> there, that would be nice as well.
--
---
it in
there, that would be nice as well.
Thanks.
--
-
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailing List
For list archives
each user is
allowed to access only a certain one.
--
-----
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailing List
For list archives:
> I'm going throught some tutorial about uploading and displaying
> images files. But the display script isn't working. Here's what I have:
I think you may want to bring this to a php based list, not a mysql one.
--
-----
just not seeing
how to make this work.
--
-
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailing List
For list archives
reciate it.
Maybe select the contents of both tables into a tmp table, and use that as
my join table above?
--
-----
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA
s show me how to run the same as
above but without the sub query?
--
---------
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailing Li
= p.id
WHERE c.user_id = '90' AND p.id IS NULL
--
-----
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
a little, and sends another chunk.
I would also try to unorder the email addresses, so that large groups of
yahoo and aol etc emails do not hit the outbound queue at the same time.
They tend to look down on that activity, and throttle you back, making it
take even longer to get your messages out
, also, there is the option of simply interfacing mysql and
your scripts with mailman, which is really one of the better ways to send
mass emails, list serves pretty much have it down these days.
--
-
Scott Haneda
ing a wildcard tossed me up an error about a duplicate key.
--
-
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailing List
For list arc
> how about:
> insert into select * from where
>
> is the primary key an auto sequence?
Yes, pk is on auto increment
--
-----
Scott HanedaTel: 415.898.2602
<http:/
> how about:
> insert into select * from where
>
> is the primary key an auto sequence?
This is what happens when I try:
insert into logbook select * from logbook where id = 1;
ERROR 1062: Duplicate entry '1' for key 1
--
-
st two sets of fields I will have to manage, which
is why I was hoping there was a sneaky SQL way to deal with it. Thanks.
--
---------
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com>
months to wrap
as needed.
I would love to do this in SQL, not in application.
--
-
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailin
I am using 4.0.18-standard
So I do not have `DATEDIFF`, but I need to ability to do so, anyone know
some other simple trick to get days between two dates?
--
-
Scott HanedaTel: 415.898.2602
<h
rt and end, however,
it also finds records where the status is NOT 'active', which I don't want.
Swapping the order of the condition seems to give me an error as well, so I
am stumped.
--
-----
Scott Haneda
27; 'yes', 'no')
FROM products WHERE id = "75"
--
-
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
on 7/14/05 3:54 PM, Sebastian at [EMAIL PROTECTED] wrote:
> i have a text field column and i want to select the rows based on the
> first letter in this column, eg:
SELECT field from table WHERE field LIKE 'M%'
--
------
---+
| ROUND(1.5467, 3) |
+--+
|1.547 |
+--+
1 row in set (0.00 sec)
So it would be something like:
INSERT into table
SET foo = ROUND(1.5467, 3);
--
-
Scott HanedaTel
just delete the user and recreate the
permissions, but I would like to figure out how to make this work.
--
-----
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A
?
--
-
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
TER, SHOW DATABASES, SUPER, LOCK TABLES,
EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'root'@'localhost'
IDENTIFIED BY PASSWORD '' WITH GRANT OPTION
This looks pretty much full access to me?
--
-
ies: 4396 Opens: 694346 Flush
tables: 1 Open tables: 64 Queries per second avg: 1.738
--
-----
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQ
osely to see if anything's missing in that list, but full
> access usually looks like this:
>
>GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD
>'' WITH GRANT OPTION
And that is the odd thing, running that giv
's row in the mysql.user table to have the correct values,
> then FLUSH PRIVILEGES (but I'm suspicious something like that is how this
> started).
I never fiddle direct like that, but there was that fix_privs_table script
mysql provided I had to run at one time during an update.
--
-
nd get what they have, or do you all have better
stuff to recommend? If I have left out anything, please let me know, I will
be sure to reply.
--
---------
Scott HanedaTel: 415.898.2602
<ht
e offerings from others.
--
---------
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/
me a bit
about the 64bit issues and how they affect me? I have someone who may just
donate my a xserve, one of the older ones, but still, not a bad piece of
hardware at all.
--
-
Scott HanedaTel: 415.898.26
t better.
Thanks again, and if there are any questions that would help me get a better
answer, please let me know.
--
---------
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, C
at Yellow Dog
> and see what's involved in getting Linux up and making a 64 bit MySQL
> Binary to run under Yellow Dog.
Sorry if this is boneheaded here, but are there non g4 bit variants you can
run on a G5 if you just want the stability until this is worked out?
--
-
table structure of clients
databases.
--
-
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailing List
For list archives: http://lists.mys
ssword I can't get in
> afterwards as root.
This may be a little out of date, but should still apply, and maybe help:
<http://www.newgeo.com/index.ws?id=17>
--
---------
Scott HanedaTel:
use the startup pane thingy, I never
used it, just start it from the command line, or leave it running all the
time, wont hurt a thing on a dev machine.
--
-----
Scott HanedaTel: 415.898.2602
&
it up with the skip grants options, and reset it
from there, then start it up normal:
<http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html>
--
-----
Scott HanedaTel: 415.898.26
to run a sql update that will pull the session_key from the backup
table, and update the sesssions table with it, based in the field id=id.
Can someone help me, I am pretty sure I know what to do, but don't want to
risk messing it up.
thanks
--
-----
ou deleted the crontab, does not mean it stops:
crontab -l
That lists the current cron jobs
crontab the_cron_file_name
Will reload the one you have changed.
Of course, you could just send the alerts to nowwhere with something like >
/dev/null
--
-----
soon" for "2". When I do this, I get
zero results returned.
--
-
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
is even possible, if so, can someone help me out a bit.
Thanks
--
-----
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailing List
For li
on 10/27/05 6:34 PM, Scott Haneda at [EMAIL PROTECTED] wrote:
> Right now, my update works as follows, and works fine, however, I want to do
> a condition to say if products.ship_status = 1 then set
> cart_test.shipping_status to 'now' else set it to 'soon'
>
&g
example of the CASE method, I tried and it would error,
the docs are a wee bit confusing in that regards.
--
---------
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.
0.
> So in this case only the 'samsung;dvd;60' row would be inserted.
Probably pretty simple to just delete them after youa re done.
--
---------
Scott HanedaTel: 415.898.2602
<http://www.ne
ice = x.xx where id = xxx
Is there some way I can do some string parsing on the text field and get to
the 3rd item where the passed in shippign_method equals?
--
-----
Scott HanedaTel: 415.898.2602
<http://w
and ever order item.
--
---------
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:htt
me out, but then I have to login again, which is a pain, how can
I tell mysql to drop me back to a clean prompt?
--
---------
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato
:-)
--
-
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
on 11/16/05 7:06 PM, Jasper Bryant-Greene at [EMAIL PROTECTED] wrote:
> Scott Haneda wrote:
>> Google this:
>> subselect site:dev.mysql.com
>> And I get mostly non English stuff, limiting to english and I get a whopping
>> 37 pages, none of which seem to help me
to the
entered result.
--
-----
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:h
gest dumping the
data, and looking at it in a editor to see if you can see what may be wrong.
Also, reimport it back into a new test table and run your tests again.
--
-----
Scott HanedaTel: 415.89
1 |
|
+---++---+-+-+---+---+--
--+
--
-
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Fax: 313.557.5052
<[EMAIL PROTECTED]> Novato, CA U.S.A.
--
MySQL General Mailing List
For list archives: http
even
> longer.
Maybe you are running the default my.cnf file, if so, you will want to
change that to be optimized. Please report back your current cnf file.
--
-----
Scott HanedaTel: 415.898.2602
<h
(0)
AND o.authnet_status IN ('empty', 'failed')
2 rows in set (0.02 sec)
--
---------
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Fax: 313.557.5052
I need to run `mysqladmin version` from a remote host, on the same LAN, what
are the min permissions for a user I need to set up to get this data?
--
-
Scott HanedaTel: 415.898.2602
<http://www.newgeo.
; (2005-12-11) and for that matter switch the date to us format. Here the
> sql statement I am doing now.
>
> select count(*), date from my_db group by date;
select count(*), DATE_FORMAT(date, '%c/%d/%Y') from my_db group by date;
--
-----
can run it
and have it not really do anything, kinda like EXPLAIN, but not exactly.
--
-
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL G
sales tax in order record)
Total Orders: $ (grand summary of total in order record)
--
-
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General M
on 12/27/05 6:25 PM, Scott Haneda at [EMAIL PROTECTED] wrote:
> I have two tables, order and order items. An order can have 1 or more order
> items.
>
> Important data in order is the `id` which is the key to link that order to
> the order_items table.
>
> Quantity of i
products.online = 0 and here is the bit that
I get stuck on, and where there is no matching products record.
--
-
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA
TE_ADD(datefield, INTERVAL 30 DAY) from table;
--
-----
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
' = 0.
There is a user_id that I match on as well, but that does not entirely
matter to this question.
Deleting where online = 0 is simple, but deleting where there is a lack of a
matching product has me stumped.
--
-----
Sc
ount(oi.product_id) as mycount
FROM products as p
LEFT JOIN order_items as oi
on (p.id = oi.product_id)
group by oi.product_id order by mycount;
--
-----
Scott HanedaTel: 415.8
ated BETWEEN "2005-01-01 00:00:00" AND "2006-02-22 23:59:59")
GROUP BY oi.product_id
ORDER by qty ASC
--
-
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com>
ly associate with each product an order and optionally past that to an
> order_item.
> HTH!
I think we are close, thanks
ERROR 1120: Cross dependency found in OUTER JOIN. Examine your ON
conditions
Not sure if this is related to my version of mysql, or something else?
--
> At 5:08 pm -0800 22/2/06, Scott Haneda wrote:
>> I think we are close, thanks
>> ERROR 1120: Cross dependency found in OUTER JOIN. Examine your ON
>> conditions
>
>>> SELECT p.id, p.prod_name, sum(oi.quantity) as qty
>>> FROM Products p
>
t;)
GROUP BY oi.product_id
INSERT INTO prod_report (SELECT id, prod_name, 0 FROM products)
SELECT * FROM prod_report GROUP BY id ORDER BY prod_name
--
-
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
can recreate it, and what do I put in it?
I can force kill the server and I am guessing it would all come back up ok,
but there must be a gentler way?
--
---------
Scott HanedaTel: 415.898.2602
<htt
;s
Suggestions?
--
---------
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://l
?
--
-
Scott HanedaTel: 415.898.2602
<http://www.newgeo.com> Novato, CA U.S.A.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
ng what command should I issue to my tables to
> correct it? Thanks
What veriosn of mysql, timestamp handling has changed from one version to
the next?
Perhaps you have others in your table, I think only the first is updated, at
least, in pre 4.1 days, after that, check the docs for the corre
Hello mysql list, I am looking for a little guidance on a a potential
query. I am sure most people have heard of the limited degrees of
separation one has to become connected to another person. This is
much like the myspace "in your extended network" idea, though I would
like my implement
I think ideally I would like to create an auto increment column that
has no requirement for uniqueness. So if 6 was the last entry, and
there are 10 of them, 7 would still be the next, is this possible?
I am assuming it is not?
I am working in a case where data is needing to be de-normalize
On Apr 2, 2009, at 12:51 AM, Steve Edberg wrote:
At 9:35 AM +0200 4/2/09, Andreas Pardeike wrote:
Hi,
I have a table 'test'
+-+--+--+-+---
++
| Field | Type | Null | Key | Default |
Extra |
+-+-
I read your other replies about the timestamp not working. I still
think adding the updated and created fields is a good idea in general,
to any table. I have some questions about the below since the
original suggestion would not work for you.
On Apr 2, 2009, at 12:35 AM, Andreas Pardeike
We need to see your entire query and the table structure. timestamp
fields can have options set to auto update them, where order matters,
and only one field can support that feature.
Please supply more data.
On Apr 28, 2009, at 2:18 PM, Antonio PHP wrote:
You have an error in your SQL synt
I have been meaning to find out about this since I moved to mysql 5.
In version 4, I never saw the table "information schema". With it
being in version 5, I assume it was something only the root users, or
a higher level user could see.
I now know that it shows up under any account. I wil
On Apr 29, 2009, at 11:29 AM, Antonio PHP wrote:
This is MySQL data structure. - I underlined where it causes the error
message. (datetime)
`id_Company` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
`Name` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL
`Revenue` mediumint(6) NO
Always echo out your SQL string, it will make it a lot more obvious.
You want to see the result. I php concatenated string can be
confusing at times.
Also, you are not escaping your data, so if you had a word of 'stops,
here' that would break it as well.
So in your case, you very well m
I am trying to monitor a specific issue, and I know it is related to
only one database. There is a lot of other noise in the logs if I
enable query logging.
Is there any way to limit query logging to just one database?
--
Scott * If you contact me off list replace talklists@ with scott@ *
What about sub selects. As I see it you only care about the highest
and lowest order of results in each list.
Sorry, in am on a mobile so I can nit make a test case, and this will
be pseudo SQL.
Select * from table where start <= (select foo) and ( select foo) ...
Also look at the "between
Hello, I am confused about repliction setup. Reading a config file,
and the docs, leads me to believe this is an either code choice, pick
#1 or #2. If that is the case, why would I want to use #1 over #2?
My confusion comes from several online references where there is a
combination of #1
Thanks, a few comments inline below...
On May 12, 2009, at 11:11 PM, Simon J Mudd wrote:
talkli...@newgeo.com (Scott Haneda) writes:
Hello, I am confused about repliction setup. Reading a config file,
and the docs, leads me to believe this is an either code choice, pick
#1 or #2. If that
1 - 100 of 316 matches
Mail list logo