Re: MySQL field data type for ISBN numbers

2003-08-11 Thread Paul Chvostek
e a bunch of things that all depend on the successful completion of previous commands, be they related to MySQL or anything else. -- Paul Chvostek <[EMAIL PROTECTED]> it.canadahttp://www.it.ca/ F

Re: quotas

2003-07-22 Thread Paul Chvostek
work. I'm still not sure I'm comfortable with the implications of allowing a user to have raw write ability to something mysqld relies on. If the user renamed his mysql database directory out of the way, would mysql barf, or just make his database unavailale (

Re: quotas

2003-07-20 Thread Paul Chvostek
the customer's web site if he's over-quota for more than one week. So far, that's been hit only once, and the customer deleted the "backup of his home computer" stored in the database within hours of the site going down. ;-) Ah, those wacky file upload toys -- P

Re: query: if exists UPDATE else INSERT?

2003-07-13 Thread Paul Chvostek
On Sun, Jul 13, 2003 at 09:52:10AM -0400, Paul Chvostek wrote: ... > $q = "UPDATE table SET value=value+$value WHERE id='$id';"; > $q .= "INSERT INTO table (id,value) VALUES ('$id',$value)"; > @mysql_query($q); Woop, I forgot this was the m

Re: query: if exists UPDATE else INSERT?

2003-07-13 Thread Paul Chvostek
sends of datasets a day - If I'm wrong let me know. Well, this is indeed your other option. Make all additions to the table be INSERTs, never UPDATEs, then when you want to pull data out, just SUM it for a particular field 'id'. INSERT INTO table (id,value) VALUES ('2003

Re: Bulk loading data

2003-07-09 Thread Paul Chvostek
0200, Rudy Metzger wrote: > > Paul, > > Did you try using REPLACE instead of UPDATE/INSERT? Could give you some > more speed enhancement. > > Cheers > /rudy > > -Original Message- > From: Paul Chvostek [mailto:[EMAIL PROTECTED] > Sent: woensdag 9 juli

Re: Bulk loading data

2003-07-09 Thread Paul Chvostek
27;m not sure how this solution would fare a hundred or a thousand times a day -- Paul Chvostek <[EMAIL PROTECTED]> Operations / Abuse / Whatever it.canada, hosting and development http://www.it.ca/ -- MySQL General

Re: Good Database Philosophy Book?

2003-07-09 Thread Paul Chvostek
lized forms, ER diagrams, CASE tools, Codd's Rules, yadda), explains *why* you'd use them, and (refreshingly) doesn't assume you'll take the author's word as gospel. It has examples which it builds on throughout the book, and seems to advocate simplicity of design over s

best way to remain "persistent"

2003-07-04 Thread Paul Chvostek
g INSERT statements directly into the text client? Presumably a CustomLog entry like this would constitute a single, persistent database connection, which would terminate when Apache went away and be restarted when Apache was re-run? Any thoughts? -- Paul Chvostek

Re: mysql command-line question...

2003-07-04 Thread Paul Chvostek
uot;, "03-0456", > "99TPPEMETALPPC/425") > > instead of: > > [EMAIL PROTECTED] root]# mysql -u root -ppw R500 < command.sql You probably want to read the man page regarding the "-e" option. -- Paul Chvostek

Re: Simple Question: MySQL and Shell Scripts

2003-06-24 Thread Paul Chvostek
; myuser="user" mypass="p4s$w0rd" #mysql="/usr/local/bin/mysql" mysql="/usr/bin/mysql" q="SELECT this,that FROM Bobstable WHERE Name=1" $mysql -u"$myuser" -p"$mypass" -e"$q&quo

Re: Datetime vs Unixtime

2003-03-13 Thread Paul Chvostek
are MySQL-specific. This is documented at http://www.mysql.com/doc/en/Extensions_to_ANSI.html . All it comes down to is that you can do whatever you want, as long as you know what you're doing. -- Paul Chvostek <[EMAIL PROTECTED]> Operatio

Re: Datetime vs Unixtime

2003-03-12 Thread Paul Chvostek
f I'm dealing with more than a few million records, I use unixtime. Heck, I sometimes even store IP addresses in unsigned INTs. It all depends on the requirements of the project. -- Paul Chvostek <[EMAIL PROTECTED]> Operations /

Re: updating many-to-many relationships?

2003-02-19 Thread Paul Chvostek
On Wed, Feb 19, 2003 at 08:13:12AM -0600, gerald_clark wrote: > > Looks to my like skuagent should be using the varchar fields instead of > the int fields. > Then you could just insert ignore each line from your test file. > > Paul Chvostek wrote: > > >Hi all. > &

updating many-to-many relationships?

2003-02-19 Thread Paul Chvostek
It's *way* more processing time for every host in the loop, but at least I won't have to take the whole thing down. I just can't seem to figure out an elegant solution. Is there one, or must I do this the ugly way? Any advice would be appreciated. :) p (And for the list robot:

temporary table permissions?

2001-12-20 Thread Paul Chvostek
there? Or is it worthwhile/safe at this point to upgrade to MySQL v4 on a production system? Tnx. -- Paul Chvostek <[EMAIL PROTECTED]> Operations / Development / Abuse / Whatever vox: +1 416 598- IT Canada

left join question, I think...

2001-12-20 Thread Paul Chvostek
nvoice,receivable WHERE invoice.custid='someconstant' AND receivable.custid=invoice.custid ORDER BY date; I'm obviously on the wrong track. Is UNION what I want to be using here? Thanks. --