Re: How to Backup the Database using Script

2009-10-29 Thread Scott Haneda
Here is how I have been doing it, for years, and I have used this to restore from, which has always worked for me. http://dl.getdropbox.com/u/340087/Drops/10.29.09/mysql_backup-0196a0c2-013914.txt A quick explanation, and some caveats: First, set the u and p variables to a mysql user and

Performance tuning a group by with percentage

2009-10-16 Thread Scott Haneda
Running MySql 5.0.85, I need to be as efficient as possible about a few queries. If I could get a little review, I would appreciate it. I collect data in the millions, and need the top 50 grouped by one field, with a percentage of how much those top 50 occupy. Here is what I have come up

Re: insert random number into table

2009-10-16 Thread Scott Haneda
In addition to what Gavin said. You seem to want some form of key perhaps to be able to identify the authenticity of your contest winner. An auto increment ID won't be very secure for that, but you still need it. Take a known combination of perhaps the key, name, email address, etc, and

Re: insert random number into table

2009-10-16 Thread Scott Haneda
I always maintain a timestamp in my random numbers. As long as my precision is higher than my requests per second, wouldn't I be safe from collisions? Assuming a time machine is not invented. -- Scott Iphone says hello. On Oct 16, 2009, at 11:29 AM, Jerry Schwartz jschwa...@the-infoshop.com

Re: Getting mySQL to ignore case sensitivity of field names

2009-08-27 Thread Scott Haneda
http://dev.mysql.com/doc/refman/5.0/en/case-sensitivity.html You need to set the field format to a non binary one, and case insensitive will be the default. On Aug 27, 2009, at 2:57 PM, Adrian Aitken wrote: Hi, Google isn't my friend :-( How can I tell mySQL 5.0 to ignore the case of field

Re: Getting mySQL to ignore case sensitivity of field names

2009-08-27 Thread Scott Haneda
methods seem prone to trouble. On Aug 27, 2009, at 3:04 PM, Scott Haneda wrote: http://dev.mysql.com/doc/refman/5.0/en/case-sensitivity.html You need to set the field format to a non binary one, and case insensitive will be the default. On Aug 27, 2009, at 2:57 PM, Adrian Aitken wrote: Hi

Logins, php, legacy, old password

2009-07-19 Thread Scott Haneda
Hello. It is time for some long overdue service consolidation on my end. I have a production machine ready to go, running the latest MySql 5 series. I have a legacy machine running MySql 4. As you know, version 4 used an older user account password system. I also will be up against some

Client deleted database, semi high priority master slave question

2009-07-08 Thread Scott Haneda
A client deleted their database and did not have a slave in place for backup. No scheduled dumps either. However, I have set up a slave to the master for one table. These tables hold DNS data for database driven DNS server features. The master table is empty, the slave rightly saw the

Re: Client deleted database, semi high priority master slave question

2009-07-08 Thread Scott Haneda
On Jul 8, 2009, at 12:49 PM, Daevid Vincent wrote: Ouch. I know it comes a little too late, but as a preventive measure going forward, I offer up my daily crontab backup script: http://www.daevid.com/content/examples/daily_backup.php They move a lot of data, so scheduled dumps were not

Re: Client deleted database, semi high priority master slave question

2009-07-08 Thread Scott Haneda
On Jul 8, 2009, at 12:49 PM, Daevid Vincent wrote: I know it comes a little too late, but as a preventive measure going forward, I offer up my daily crontab backup script: http://www.daevid.com/content/examples/daily_backup.php FYI, this link does not work in Safari. -- Scott * If you

Re: Can a MyISAM DB hold /everything/?

2009-05-28 Thread Scott Haneda
The times I have heard, this is just a test, hack it together, or this will never see significant load are more than I care to count. Worse, the times that those statements ended up being false, and a rigged and hacked demo code base become production has taught me to treat all work as

Re: Can a MyISAM DB hold /everything/?

2009-05-28 Thread Scott Haneda
A bit of a confusing set of replies was in the previous thread... Doing my best to answer the issue at hand, please reference past posts if my reply is not clear... On May 28, 2009, at 6:04 AM, PJ wrote: Could you clarify/expand on this a bit - I am setting up a site where I expect to

Re: Can a MyISAM DB hold /everything/?

2009-05-27 Thread Scott Haneda
Unless you have very good reason to store binary data like an image in your database, do not. It may work well for a time, but always be prepared that your system will grow. If it grows a good deal relative to your hardware, and users, and connections etc, you will always be in a race to

Re: Upgrade Mysql

2009-05-20 Thread Scott Haneda
On May 20, 2009, at 1:27 AM, Webmaster Studio Informatica wrote: I need to upgrade Mysql 4 to Mysql 5 on Linux. Sometimes I will uninstall version 4 and install version 5. With uninstallation usually database files remain in /var/lib/mysql/ I want to know if with the installation of

Re: Replication config

2009-05-16 Thread Scott Haneda
On May 16, 2009, at 12:28 AM, Simon J Mudd wrote: I also, in section [mysqld] # Begin slave config 05/14/2009 server-id = 2 master-host = ip.add.re.ss master-user = user-replicate master-password = xx master-port = 3306 # End slave config No. not necessary as the information is stored in

Re: Replication config

2009-05-15 Thread Scott Haneda
On May 12, 2009, at 11:11 PM, Simon J Mudd wrote: 1. Ensure binlogging is enabled on the master. 2. Ensure you setup grant permissions so the slave can connect to the master. 3. Configure on the slave the replication (which databases need to be replicated) 4. Get the master and slave in

Re: Replication config

2009-05-14 Thread Scott Haneda
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 is the case, why would I want to use #1

Re: Replication config

2009-05-13 Thread Scott Haneda
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

Replication config

2009-05-12 Thread Scott Haneda
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

Re: Help with mysql query, multiple list

2009-05-10 Thread Scott Haneda
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

Query log for just one database

2009-05-07 Thread Scott Haneda
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@ *

Re: Now() : SQL syntax error. But why?

2009-04-30 Thread Scott Haneda
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

Re: Now() : SQL syntax error. But why?

2009-04-29 Thread Scott Haneda
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)

Re: Now() : SQL syntax error. But why?

2009-04-28 Thread Scott Haneda
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

Information Schema

2009-04-28 Thread Scott Haneda
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 will

Re: Auto increment?

2009-04-02 Thread Scott Haneda
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 |

Re: Auto increment?

2009-04-02 Thread Scott Haneda
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

Auto increment without uniquness

2009-03-19 Thread Scott Haneda
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

Hypothetically looking for Kevin Bacon

2008-12-18 Thread Scott Haneda
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

Anyone know what to do about OS X 10.5 PPC

2008-08-08 Thread Scott Haneda
I can not find a pkg installer for OS X 10.5 on PPC, any suggestions? Would I want the 64 or 32 bit version of this as well? I also need to know a simple php 5 installer that works on 10.5 for PPC, I am growing very tired of building that one out all the time, and Entropy seems to have

Re: Anyone know what to do about OS X 10.5 PPC

2008-08-08 Thread Scott Haneda
I think I got this worked out, you can use the 10.4 installer for OS X on PPC. Use the 32 bit one for G4, and the 64 bit one for G5, or you can still use the 32 bit one on the G5 if you want to. Just install the app, do not install the startup item or the prefpane, they do not work, and

improving random record selection

2008-05-17 Thread Scott Haneda
I posted this a month or so ago, and was helped a little, but I am now back. Currently I use select x, y, z from images where (condition) order by rand() limit 1; As most know, it is slow, depending on the record set, and what I compare it to, it can be from one order of magnitude

Re: Age old order by rand() issue

2008-05-02 Thread Scott Haneda
I have seen nicer fast random row implement, but that will work. Do you happen to have a snip of it, the one I have seems to lean pretty heavy as far as I can tell, and on occasion, though rare, also sends me an empty result set. -- Scott [EMAIL PROTECTED] -- MySQL General Mailing List

Age old order by rand() issue

2008-05-01 Thread Scott Haneda
List search seems to return 0 results, and I am a bit stumped. Getting a more optimized order by random with 1 record... I found a snip online that works, but seems to return an empty on occasion, and I am not sure why: SELECT storage_path, image_md5, id FROM images JOIN (SELECT

Design decision

2007-10-03 Thread Scott Haneda
suggestions? Thanks. -- - 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

Re: Design decision

2007-10-03 Thread Scott Haneda
Scott Haneda wrote: I have an a table of objects, attached to those objects are keywords. Users submit the keywords to the objects. Currently, I chose to keep a hit count on the keywords, so if a duplicate keyword is supplied, a counter is incremented. I thought this was a good idea

single line inserts with on duplicate key

2007-10-03 Thread Scott Haneda
id is for each of an arbitrary amount of single-line inserts. Defining what I am calling single line insets, I mean: INSERT INTO foo (a, b, c) VALUES ('x', 'y', 'x'), ('x', 'y', 'x'), ('x', 'y', 'x'), etc etc -- - Scott Haneda

OS X binary installer

2007-09-19 Thread Scott Haneda
. -- - 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

Hypothetical design question regarding keyword searching

2007-07-19 Thread Scott Haneda
. Are there other approaches? Which approach would yield the best performance for growth issue? -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Novato, CA U.S.A. -- MySQL General

User variables in update statement

2007-07-10 Thread Scott Haneda
not work. 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

How do you reference custom column names

2007-06-19 Thread Scott Haneda
*tax_rate+something-other)+.6) Where what I really want to do is: SELECT price*tax_rate+something-other as foo, (foo+.6) -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Novato, CA

Re: Replace, Substitute, Delete

2007-05-09 Thread Scott Haneda
') | ++ | De%20Long | ++ 1 row in set (0.00 sec) Which will url encode the space, which will allow perfectly for spaces in filenames on a web server. -- - Scott Haneda

Re: Replace, Substitute, Delete

2007-05-09 Thread Scott Haneda
part is my opinion, but I do tend to find most will agree with it. -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Novato, CA U.S.A. -- MySQL General Mailing List For list

Re: Replace, Substitute, Delete

2007-05-09 Thread Scott Haneda
the idea, that would select all image names that end in 'd' -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Novato, CA U.S.A. -- MySQL General Mailing List For list archives

Bin logs and mysql 4

2007-04-26 Thread Scott Haneda
Running mysql 4, just poked into data and see I have gigs and gigs of hostname-bin.xxx log files. How does one maintain these, can someone point me to relevant data on what to do about drive space being lost to these? thanks -- - Scott

Re: Bin logs and mysql 4

2007-04-26 Thread Scott Haneda
-- - 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

Re: Bin logs and mysql 4

2007-04-26 Thread Scott Haneda
just disable said feature? Heck, some of these boogers are a GB each :-) -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Novato, CA U.S.A. -- MySQL General Mailing List

Re: MySQL e-zine

2007-04-26 Thread Scott Haneda
at least, it would be more about internals, that the step by step of how to do a join. -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Novato, CA U.S.A. -- MySQL General

Possible in sql, or just move it to a language

2007-03-15 Thread Scott Haneda
1 Should I just run a loop in my language of choice, or is there a join I am not seeing here? -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Novato, CA U.S.A. -- MySQL

Re: Choose a random record from a list of duplicates

2007-01-09 Thread Scott Haneda
LIMIT 1 or so. (warning, untested) And I think you will want to group by surname and postcode in order to filter out the duplicates. -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com

Re: Mysql, PHP and Persistent mode

2006-12-21 Thread Scott Haneda
to your database, depending on how you connect, you may make 50 connections, or not. What you should do, is grab the 50 images ahead of time, in one select, and use some php to iterate them and display them. -- - Scott Haneda

Re: Mysql, PHP and Persistent mode

2006-12-21 Thread Scott Haneda
, where x is as many thumbnails as you have, not to mention, x also represents that many http calls to your server, and also, that many times php must process that file. -- - Scott HanedaTel: 415.898.2602 http

Cloning or duplicating a record

2006-09-14 Thread Scott Haneda
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 archives: http

Re: Cloning or duplicating a record

2006-09-14 Thread Scott Haneda
how about: insert into table_name select * from table_name where select criteria is the primary key an auto sequence? Yes, pk is on auto increment -- - Scott HanedaTel: 415.898.2602 http

Re: Cloning or duplicating a record

2006-09-14 Thread Scott Haneda
-- - 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]

Re: Cloning or duplicating a record

2006-09-14 Thread Scott Haneda
there was a sneaky SQL way to deal with it. Thanks. -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Novato, CA U.S.A. -- MySQL General Mailing List For list archives: http

Re: Mass E-mail Options

2006-08-30 Thread Scott Haneda
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. -- - Scott Haneda

Re: Mass E-mail Options

2006-08-30 Thread Scott Haneda
serves pretty much have it down these days. -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Novato, CA U.S.A. -- MySQL General Mailing List For list archives: http

I don¹t have sub queries, can someone suggest alternatives

2006-08-08 Thread Scott Haneda
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 List For list archives: http

Re: I don¹t have sub queries, can someone suggest alternatives

2006-08-08 Thread Scott Haneda
to run the same as above but without the sub query? I am pretty sure I worked this out with the following: DELETE cart2.* FROM cart2 c LEFT JOIN products p ON c.product_id = p.id WHERE c.user_id = '90' AND p.id IS NULL -- - Scott Haneda

Join with additional table, stumped

2006-08-02 Thread Scott Haneda
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 U.S.A. -- MySQL General Mailing List For list

Is this privilege case even possible

2006-07-25 Thread Scott Haneda
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: http

Re: newbie needs help

2006-07-21 Thread Scott Haneda
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. -- - Scott Haneda

Table specific privileges

2006-07-13 Thread Scott Haneda
this 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. -- MySQL

Re: Table specific privileges

2006-07-13 Thread Scott Haneda
this in phpMyAdmin, so if anyone knows how to do it in there, that would be nice as well. -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Novato, CA U.S.A. -- MySQL General Mailing

Table specific privileges (BUMP)

2006-07-13 Thread Scott Haneda
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: http

Re: Table specific privileges (BUMP)

2006-07-13 Thread Scott Haneda
one. -- - 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

Re: I don't understand why SCSI is preferred.

2006-07-11 Thread Scott Haneda
better. Almost everything, they have not hit that capacity issue yet, they are all generally much smaller that non SCSI. -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Novato, CA

Re: automatic timestamp

2006-07-05 Thread Scott Haneda
, 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.1/en/timestamp-4-1.html -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com

Re: Leading zero where strlen 5

2006-06-27 Thread Scott Haneda
was well. Thanks everyone. -- - 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

Leading zero where strlen 5

2006-06-26 Thread Scott Haneda
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

Re: Leading zero where strlen 5

2006-06-26 Thread Scott Haneda
',ZipCodes), 5) WHERE length(ZipCodes) 5 Works, perfect, thanks to both of you. -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Novato, CA U.S.A. -- MySQL General Mailing List

Records in front of and behind another record

2006-06-26 Thread Scott Haneda
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. -- MySQL General

Re: Records in front of and behind another record

2006-06-26 Thread Scott Haneda
use server side code to determine the closest. -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Novato, CA U.S.A. -- MySQL General Mailing List For list archives: http

Re: Records in front of and behind another record

2006-06-26 Thread Scott Haneda
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 the same as running two selects? -- - Scott HanedaTel

Re: Records in front of and behind another record

2006-06-26 Thread Scott Haneda
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 queries? I won't comment

Re: summing of my distance query

2006-06-24 Thread Scott Haneda
columns is illegal if there is no GROUP BY clause -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Novato, CA U.S.A. -- MySQL General Mailing List For list archives: http

summing of my distance query

2006-06-23 Thread Scott Haneda
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.2602 http://www.newgeo.com

Re: summing of my distance query

2006-06-23 Thread Scott Haneda
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 -- - Scott HanedaTel: 415.898.2602 http

Importing large data sets

2006-06-22 Thread Scott Haneda
is in quotes and comma sep Can someone tell me, how to rapidly import all this data into a table. -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Novato, CA U.S.A. -- MySQL

Finding records that do not exist

2006-06-19 Thread Scott Haneda
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.com/mysql To unsubscribe

Aborting a greedy querry from the command line

2006-06-19 Thread Scott Haneda
the 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: http

One to many meetting specific conditions

2006-05-25 Thread Scott Haneda
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 Novato, CA U.S.A

Re: Returning records in a circle

2006-05-12 Thread Scott Haneda
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 http://www.newgeo.com

One to many join with only one result

2006-05-11 Thread Scott Haneda
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 List For list archives: http

Re: TIMESTAMP field not automatically updating last_updated field

2006-03-30 Thread Scott Haneda
, 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 correct behavior. -- - Scott Haneda

Host denied errors

2006-03-24 Thread Scott Haneda
? -- - 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]

Best way to design one to many queries

2006-03-07 Thread Scott Haneda
? -- - 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

Deleted sock file, how can I recover

2006-03-03 Thread Scott Haneda
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 http://www.newgeo.com

Re: Inner join with left join

2006-02-23 Thread Scott Haneda
-- - 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]

Re: Inner join with left join

2006-02-22 Thread Scott Haneda
-- - 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

Re: Inner join with left join

2006-02-22 Thread Scott Haneda
ON conditions Not sure if this is related to my version of mysql, or something else? -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Novato, CA U.S.A. -- MySQL General

Re: Inner join with left join

2006-02-22 Thread Scott Haneda
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 LEFT JOIN orders as o ON (p.id = oi.product_id) Maybe

Inner join with left join

2006-02-21 Thread Scott Haneda
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.898.2602 http://www.newgeo.com

Semi-complicated delete

2006-01-11 Thread Scott Haneda
. 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. -- - Scott Haneda

Joined delete where records may or may not exist

2006-01-05 Thread Scott Haneda
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 U.S.A

Re: Getting # of days until expiration

2006-01-05 Thread Scott Haneda
; -- - 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]

Grand summary

2005-12-27 Thread Scott Haneda
of 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 Mailing

Re: Grand summary

2005-12-27 Thread Scott Haneda
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 items is stored

Merging two tables

2005-12-16 Thread Scott Haneda
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 General Mailing

  1   2   3   4   >