Re: update question number in mysql

2002-04-12 Thread Steven Hajducko
On Fri, 2002-04-12 at 13:52, Christopher Thompson wrote: > You shouldn't be storing the questio number at all. You have denormalised > your database and this is why you are experiencing this problem. Maybe I don't understand bin's problem, but storing the question # wouldn't seem to be de-norma

Re: Design decision on generating data

2002-04-12 Thread Steven Hajducko
Usually I build my queries dynamically. I store all the values into a hash ( this is in perl mind you.. ) Then do something like this.. my (@fields, @vals); my ($field_str, $val_str); foreach $field_name (keys %hash) { if ($hash{$field_name}) { push @fields, $fie

Re: Design decision on generating data

2002-04-12 Thread Carl Schmidt
Thank you for the information. Let me please clarify that i am using a web form. I tried the one solution of converting those values that are not set to null, but mysql complained: SQL: INSERT INTO Development_Event_Show(showID,venueID,description,ageCutoff,ageDelimiter,price1,price2) VALU

Re: Design decision on generating data

2002-04-12 Thread Christopher Thompson
On Friday 12 April 2002 8:10 pm, Carl Schmidt wrote: > I have a form where a user enters some numbers into text boxes. Some of > the text boxes can be left blank. The business logic receives all > variables to all text boxes. Should I : I'm assuming that you are using an executable file and NO

Design decision on generating data

2002-04-12 Thread Carl Schmidt
I have a form where a user enters some numbers into text boxes. Some of the text boxes can be left blank. The business logic receives all variables to all text boxes. Should I : 1.) Validate on the page for the presence of a value, and if not, set the corresponding value to -1 (it will never b

I have been warned...

2002-04-12 Thread David Adam
mysql> load data local -> infile 'bigD' -> into table bigD -> fields terminated by ',' -> enclosed by '"' -> ; Query OK, 18405 rows affected (6.70 sec) Records: 18407 Deleted: 0 Skipped: 2 Warnings: 2395826 This seems worth looking into, but I can't figure out where to find

load file from remote host

2002-04-12 Thread Jim Philips
keywords: sql, query Is it possible to load a file from a remote host as data type blob? This needs to be done from within the C API. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http:/

Re: load data infile file location???

2002-04-12 Thread Steven Hajducko
Hey BJ, Can the mysql user actually get into that directory ('/home/user/directory')? If the mysql user can't read that directory, then it doesn't matter than it owns that file. You might want to check, do an 'su - mysql' ( replace mysql with whatever user is running the mysql daemon ), then tr

Re: load data infile file location???

2002-04-12 Thread Jim Dickenson
Did you try load data local? That way, as I understand things, the server is not reading the data the client is. On 4/12/2002 1:26 PM, "BJ Phillips" <[EMAIL PROTECTED]> wrote: > I can load files from '/home/mysql' but when trying to do it from any other > user ('/home/user/directory'), I get a

Binary package for HPUX 11.00

2002-04-12 Thread Zengfa Gao
Hi, all: Can anyone tell me where can I download formal MySQL binary package for HPUX 11.00? On MySQL website, it is still HPUX 10.20. Thanks! Zengfa __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/

Re: MySQL concept question

2002-04-12 Thread Christopher Thompson
Sure, just don't include it in the list of columns to bring back. SELECT column1, column2 FROM ... instead of SELECT * FROM... or SELECT columnIDoNotWant, column1, column2 FROM ... On Friday 12 April 2002 3:29 pm, Thi Cao wrote: > Can I hide the auto_increment field? > > -Original Messag

RE: MySQL concept question

2002-04-12 Thread Thi Cao
Can I hide the auto_increment field? -Original Message- From: Gregory Junker [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 5:23 PM To: MySQL Subject: RE: MySQL concept question if you are interested in selecting records in the order in which they were inserted, apply an auto

Re: time zones?

2002-04-12 Thread Keith C. Ivey
I wrote: > Using UNIX_TIMESTAMP() on a > timestamp column will produce an epoch time (in seconds), but it > won't necessarily be the right epoch time, because of daylight saving > time (summer time) and possibly data that has moved from one time > zone to another. Actually the documentation

Re: time zones?

2002-04-12 Thread Keith C. Ivey
On 12 Apr 2002, at 14:01, Lance Uyehara wrote: > > On 12 Apr 2002, at 13:05, Lance Uyehara wrote: > > > UNIX_TIMESTAMP > > > > Maybe I'm missing something, but I don't think that's the answer. > > How does UNIX_TIMESTAMP() know whether the timestamp is in summer > > time (or even what time zone i

Re: Newbie "GROUP"-type question

2002-04-12 Thread Bill Easton
select date_format(datepurch,'%Y-%m') as MONTH, count(*), sum(cost) from cd group by MONTH > Date: Fri, 12 Apr 2002 14:57:55 -0400 > From: Jesse Sheidlower <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: Newbie "GROUP"-type question > > I'm relatively new to the construction of

RE: MySQL and stored procedures -> v4.1 :(

2002-04-12 Thread Land, Christopher
5.2.12 Other Optimisation Tips http://www.mysql.com/doc/T/i/Tips.html ... - Normally you should try to keep all data non-redundant (what is called 3rd normal form in database theory), but you should not be afraid of duplicating things or creating summary tables if you need these to gain more spee

Re: cron job help running mysql/php script

2002-04-12 Thread Steven Deaton
You might try a lynx --dump ?? ---Steven Deaton - Original Message - From: Harpreet Kaur <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, April 12, 2002 1:52 PM Subject: cron job help running mysql/php script > I wrote my first cron job to run a php script

Re: time zones?

2002-04-12 Thread Lance Uyehara
> On 12 Apr 2002, at 13:05, Lance Uyehara wrote: > > > [EMAIL PROTECTED] wrote: > > > > It might be > > > worthwile to have some way of retreiving a timestamp as an epoch value in > > > addition to other fifty ways you can currently retrieve it. (If there > > > already is a way, I'd be thrilled to

cron job help running mysql/php script

2002-04-12 Thread Harpreet Kaur
I wrote my first cron job to run a php script once every minute. The command i wrote is as follows: * * * * * * lynx http://domain ip address/scripts/crontest.php It doesnt seem to work as i tell it to populate the log table in the database. It runs fine when run through the browser. Where am i

Re: update question number in mysql

2002-04-12 Thread Christopher Thompson
You shouldn't be storing the questio number at all. You have denormalised your database and this is why you are experiencing this problem. Instead, store a unique identifier with each one (an 'id' field, autonumbering) and then, when you pull back all the questions, order it by this ID field.

Re: time zones?

2002-04-12 Thread Keith C. Ivey
On 12 Apr 2002, at 13:05, Lance Uyehara wrote: > > [EMAIL PROTECTED] wrote: > > It might be > > worthwile to have some way of retreiving a timestamp as an epoch value in > > addition to other fifty ways you can currently retrieve it. (If there > > already is a way, I'd be thrilled to hear about i

update question number in mysql

2002-04-12 Thread bin cai
Hello, verybody, I am afraid to send my question again. i created a table in mysql database system to store exam questions which has the following column fields: questionnumber(integer),questionbody(String), answers (String) and etc. My problem is if i delete one row(question record) how can iup

Re: load data infile file location???

2002-04-12 Thread Christopher Thompson
On Friday 12 April 2002 2:26 pm, BJ Phillips wrote: > I can load files from '/home/mysql' but when trying to do it from any other > user ('/home/user/directory'), I get an error 13 about cannot get stat on > file such and such. The files are located on the server and are owned by > the user, both

load data infile file location???

2002-04-12 Thread BJ Phillips
I can load files from '/home/mysql' but when trying to do it from any other user ('/home/user/directory'), I get an error 13 about cannot get stat on file such and such. The files are located on the server and are owned by the user, both mysql user and the system user. I specify the full path to

RE: Is there a function to sort the result (after using ORDER BY)?

2002-04-12 Thread Lopez David E-r9374c
Keith What about placing the output of the select in a temporary table in mysql space and making a second selection from the temp table. That would get you what you want. 1) CREATE TEMPORARY TABLE tmp ... 2) INSET into tmp SELECT ... 3) SELECT ... FROM tmp ... Just a thought David -

Re: Access Denied

2002-04-12 Thread Jane Tsai
BJ, I got those errors after I installed: 1. DBI-1.18.tar.gz 2. Msql-Mysql-modules-1.2219.tar.gz. 3. Data-Dumper-2.101.tar.gz 4. Data-ShowTable-3.3tar.gz Do I miss something here?Didn't it complain "MySQL-DBI-perl-bin" not found? Where should it get from?Or one of the above not

Re: auto update number in mysql

2002-04-12 Thread Kevin Stone
If the integer value of the question number is not being used for sorting then you can ensure a unique key value for each row by setting the column to AUTO INCREMENT. ALTER TABLE `questions_dbase`.`questions_table` CHANGE `questionnumber` `questionnumber` BIGINT(20) DEFAULT '0' NO

Re: time zones?

2002-04-12 Thread Russell E Glaue
We use a Network Time Server to keep the MySQL server in the right time. -RG On Fri, 12 Apr 2002, John Klein wrote: > > [EMAIL PROTECTED] wrote: > > > > As I understand it, the mysql TIMESTAMP type represents the time in your > > local timezone (the one your computer is using). > > > > This make

Re: time zones?

2002-04-12 Thread Lance Uyehara
> [EMAIL PROTECTED] wrote: > > > > As I understand it, the mysql TIMESTAMP type represents the time in your > > local timezone (the one your computer is using). > > > > This makes it problematic to use in timezones that have a summer/daylight > > savings time. All of the date arithmetic functions

Re: time zones?

2002-04-12 Thread John Klein
[EMAIL PROTECTED] wrote: > > As I understand it, the mysql TIMESTAMP type represents the time in your > local timezone (the one your computer is using). > > This makes it problematic to use in timezones that have a summer/daylight > savings time. All of the date arithmetic functions will yield

Re: time zones?

2002-04-12 Thread Erik Rantapaa
As I understand it, the mysql TIMESTAMP type represents the time in your local timezone (the one your computer is using). This makes it problematic to use in timezones that have a summer/daylight savings time. All of the date arithmetic functions will yield inaccurate results if one of the date

Re: InnoDB

2002-04-12 Thread Rodrigo Gonzalez
Is just a tunning problem?Well, no problem, I continue testing Regards. - Original Message - From: "Heikki Tuuri" <[EMAIL PROTECTED]> To: "Rodrigo Gonzalez" <[EMAIL PROTECTED]> Cc: "MySQL List" <[EMAIL PROTECTED]> Sent: Friday, April 12, 2002 4:38 PM Subject: Re: InnoDB > Rodri

Re: InnoDB

2002-04-12 Thread Heikki Tuuri
Rodrigo, - Original Message - From: "Rodrigo Gonzalez" <[EMAIL PROTECTED]> To: "Heikki Tuuri" <[EMAIL PROTECTED]> Cc: "MySQL List" <[EMAIL PROTECTED]> Sent: Friday, April 12, 2002 10:27 PM Subject: Re: InnoDB > You are right, I didnot see this section so well > > BTW: I am really in

auto update number in mysql

2002-04-12 Thread bin cai
Hello, verybody, currently i got one question. i create a table in mysql database to store questions which have following column fields: questionnumber, questionbody, answers and etc. My problem is if i delete one row(question) how can i update the questionnumber in the easiest way which means mys

Re: InnoDB

2002-04-12 Thread Rodrigo Gonzalez
You are right, I didnot see this section so well BTW: I am really interested in InnoDB features, do you have an answer for the second question about queries taking so long time? Regards, Rodrigo Gonzalez. - Original Message - From: "Heikki Tuuri" <[EMAIL PROTECTED]> To: <[EMAIL PRO

Re: ENUM Default values on NULL

2002-04-12 Thread Michael Stassen
Ruben, I think youare referring to my earlier message, but no matter. You cannot insert NULL into a column you've defined as NOT NULL, with some special exceptions (auto_increment and timestamp, for example). As I said before, if you want a column to get its default value, you leave it out of t

RE: About escape character '\'

2002-04-12 Thread Kathy Sung
thanks a lot, it helps Kathy -Original Message- From: Bill Easton [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 9:44 AM To: [EMAIL PROTECTED] Cc: Kathy Sung Subject: RE: About escape character '\' Sorry, I guess I answered too quickly. You have a problem, if you have to use

Newbie "GROUP"-type question

2002-04-12 Thread Jesse Sheidlower
I'm relatively new to the construction of complex queries, and I'm trying to figure one out that I'm sure is common; I wasn't able to find anything especially helpful in the docs. Suppose I have the canonical database of CDs, with one table, which includes fields for title, cost, and date_purcha

Re: ENUM Default values on NULL

2002-04-12 Thread Ruben I Safir
Your example is not the same, it sends only one value to a 2 value table. It definetely does not work if you send NULL INSERT VALUES(NULL) Ruben On 2002.04.12 14:10 Michael Stassen wrote: > > On Fri, 12 Apr 2002, Steve Katen wrote: > > > Ruben, > > > > If you leave it as NOT NULL it should

mysqldump and replication

2002-04-12 Thread Luc Foisy
would there be any issues if I am replicating an empty database, we have a development serer, I wish to dump from it to the live server ( the empty database being replicated) I want to "msqldump database | mysql database" would that replicate fine on the slave? Luc Foisy mysql, query ---

Re: InnoDB

2002-04-12 Thread Heikki Tuuri
Rodrigo, from the manual: " If the disk becomes full you may want to add another data file to another disk, for example. Then you have to look the size of ibdata1, round the size downward to the closest multiple of 1024 * 1024 bytes (= 1 MB), and specify the rounded size of ibdata1 explicitly in

RE: Is there a function to sort the result (after using ORDER BY)?

2002-04-12 Thread Keith C. Ivey
On 12 Apr 2002, at 17:54, SED wrote: > However, I want to get the result > and then sort the result by importance e.g.: > > result (date, name, impoartance): > > 20020102, John, 3; > 20020101, Smith, 5; > 20010101, Sigmund, 1; > 2101, Sigmund, 8; > > now I want to sort the result by import

RE: MySQL and stored procedures -> v4.1 :(

2002-04-12 Thread Jon Frisby
> Checked my own version and found it to be "Ver 11.16 Distrib 3.23.49". > > He, version 11??? Quit confused, but after a sanity check with reality > I realized I must be using version 3.23. Anyhow, check the status of > next version and found out that version 4.0 is in alpha mode... The "Ver 11.1

Re: Re: unkown table is full

2002-04-12 Thread Sinisa Milivojevic
Richard Clarke writes: > This is mysql 4.0.1-alpha. > > Ric > Please submit to us a full repeatable test case at [EMAIL PROTECTED] -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fullt

Re: accessing MySQL database from Access

2002-04-12 Thread Yvon Darang
Does the same scenario apply to MySQL database on a Linux server? Yvon Bill Easton wrote: > On the grounds that someone else may have this problem, and in response to > John's post, below, I am providing a "cookbook" of how to do what I asked. > > The problem: I have a bunch of users, all w

Re: Re: unkown table is full

2002-04-12 Thread Richard Clarke
This is mysql 4.0.1-alpha. Ric - Original Message - From: "Sinisa Milivojevic" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, April 12, 2002 5:08 PM Subject: Re: Re: unkown table is full > Richard Clarke writes: > > There is plenty of space. In exces

Re: ENUM Default values on NULL

2002-04-12 Thread Michael Stassen
On Fri, 12 Apr 2002, Steve Katen wrote: > Ruben, > > If you leave it as NOT NULL it should default to NO. "If an ENUM is > declared NOT NULL, the default value is the first element of the list of > allowed values." > > SIDE QUESTION: > Are you doing something like: select * from table where enu

MySQL and GRID

2002-04-12 Thread Gabriele Carcassi
Hi everyone, I am trying to find any project regarding the integration of GRID tools (i.e. Globus) with MySQL. For those who are not familiar with the GRID, what I basically want to do is to manage a collection of MySQL DBs (we deal with large amount of data) over a series of MySQL servers. I ha

RE: Is there a function to sort the result (after using ORDER BY)?

2002-04-12 Thread SED
Thanks for the reply! Do you mean like ".. ORDER BY date DESC, name, importance LIMIT 0,20; "? If so, I get the result ordered first by date, and if two dates are equal then the importance takes in. However, I want to get the result and then sort the result by importance e.g.: result (date, nam

Re: ENUM Default values on NULL

2002-04-12 Thread Michael Stassen
Instead of inserting NULL, leave the column out. INSERT mytable (2nd_col_name) VALUES (NULL); If you don't mention the enum column, it gets the default. Michael On Fri, 12 Apr 2002, Ruben I Safir wrote: > When I send a NULL it's rejected as bad data, which sort of makes sense > > > On 2002.0

RE: nvarchar

2002-04-12 Thread adam nelson
I think he is saying varchar with support for unicode (that's how it is labeled in sqlserver). -Original Message- From: Jeremy Zawodny [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 1:07 AM To: saraswathy saras Cc: [EMAIL PROTECTED] Subject: Re: nvarchar On Thu, Apr 11, 2002 a

RE: Turning off innodb

2002-04-12 Thread Chuck \"PUP\" Payne
Yes have to turn it off in my.conf -Original Message- From: Scott Olson [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 12:47 PM To: [EMAIL PROTECTED] Subject: Turning off innodb Is it possible to turn off Innodb in MySQL 4.0 via the my.cnf file? Or command line params or someth

Re: ENUM Default values on NULL

2002-04-12 Thread Steve Katen
Ruben, "If you insert an invalid value into an ENUM (that is, a string not present in the list of allowed values), the empty string is inserted instead as a special error value." it is inserting the value as the first value in the table which is the error value or the index of 0. i would ass

Re: Turning off innodb

2002-04-12 Thread Dan Nelson
In the last episode (Apr 12), Scott Olson said: > Is it possible to turn off Innodb in MySQL 4.0 via > the my.cnf file? Or command line params or > something? Put the following line in your my.cnf: skip-innodb -- Dan Nelson [EMAIL PROTECTED] --

Re: Load Blancing Mysql Max Db Server Between 2 Servers

2002-04-12 Thread Russell E Glaue
Well LVS is good for any application including read-write loadbalancing. But to do this for MySQL, you'll have to have master-master replication set up. master-master replication in MySQL is still yet to be perfected. It is not usually the best idea to operate any databases on an NFS drive. This

Re: Turning off innodb

2002-04-12 Thread Rodrigo Gonzalez
skip-innodb - Original Message - From: "Scott Olson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, April 12, 2002 1:46 PM Subject: Turning off innodb > Is it possible to turn off Innodb in MySQL 4.0 via > the my.cnf file? Or command line params or > something? > > I would li

Re: ENUM Default values on NULL

2002-04-12 Thread Gerald Clark
Steve Katen wrote: > Ruben, > > If you leave it as NOT NULL it should default to NO. "If an ENUM is > declared NOT NULL, the default value is the first element of the list > of allowed values." > > SIDE QUESTION: > Are you doing something like: select * from table where enum_colum="NO" > > I

Locking tables

2002-04-12 Thread Carl Schmidt
Sorry about the mutli post of this, but I got some mail daemon errors, so I'm sending again to make sure. The question is below. Carl -- Forwarded message -- Date: Fri, 12 Apr 2002 10:20:37 -0400 From: Carl Schmidt <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Locking table

min() bug

2002-04-12 Thread Artem V. Ryabov
Hello bugs, min return not value from table. mysql> select min(ord) from cSectText where SectID=932; +-+ | min(ord)| +-+ | -20020412051744 | +-+ 1 row in set (0.00 sec) mysql> select ord from cSectText where SectID=932

Re: ENUM Default values on NULL

2002-04-12 Thread Ruben I Safir
When I send a NULL it's rejected as bad data, which sort of makes sense On 2002.04.12 12:33 Steve Katen wrote: > Ruben, > > If you leave it as NOT NULL it should default to NO. "If an ENUM is > declared NOT NULL, the default value is the first element of the list of > allowed values." > Th

Is there a function to sort the result (after using ORDER BY)?

2002-04-12 Thread SED
Hi, Not yet found anything to cover this on the online-docs so I'm aiming at you :) I need to sort the result afterwards e.g.: SELECT name, date, importance FROM 'mytable' WHERE date>'myTime' ORDER BY date DESC, name LIMIT 0,20; ...then I need to sort *only* the result by the 'importance', can

Re: Load Blancing Mysql Max Db Server Between 2 Servers

2002-04-12 Thread Frankie Gravato
Yes this is good subject problem is the site this is being used on had data being written to the db so read only system really isn't going to help me. wonder if mysql developers can shed some light on this subject. - Original Message - From: "Jason Yates" <[EMAIL PROTECTED]> To: "Russel

Re: Load Blancing Mysql Max Db Server Between 2 Servers

2002-04-12 Thread Jason Yates
On Fri, 2002-04-12 at 11:47, Russell E Glaue wrote: > > If your database is read-only, you can use Linux Virtual Server to load > balance traffic to MySQL servers. > -RG > > LVS as you said it is only good for read-only. Are there any solutions for non read-only load balancing, using replicat

mysqldump

2002-04-12 Thread Steve Buehler
I know this is more of an php question, but I think that some of the mysql people that use PHP might want to know about this in case they need it since it is for accessing a dump of a mysql database. I found two ways of doing this: 1. (using the exec() method) exec("mysqldump -q -u$userName -p$

Re: BUG using left join.

2002-04-12 Thread Gerald Clark
You are passing a string to compare to a date. If you do this, pass it in the string format. Other wise " and t_boxdaily.boxdate < 19990101 " Steve Briant wrote: >Hi, > >I think I may have spotted a bug in connection with the LEFT JOIN statement. > >The following SQL > >select name, sum(

Turning off innodb

2002-04-12 Thread Scott Olson
Is it possible to turn off Innodb in MySQL 4.0 via the my.cnf file? Or command line params or something? I would like to be able to do this to since the device that MySQL is running on does not have the space available for the minimal 10Mb Innodb file. I realize I can probably do this be recomp

RE: About escape character '\'

2002-04-12 Thread Bill Easton
Sorry, I guess I answered too quickly. You have a problem, if you have to use a literal SQL statement, and the various DBMS's use different escape syntax. However, in Java, you can just use a prepared statement String sql = "INSERT INTO files (filepath) VALUES (?)"); PreparedStatement

RE: BUG using left join.

2002-04-12 Thread BJ Phillips
Is the date read the same with or without the dashes? -Original Message- From: Steve Briant [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 9:17 AM To: [EMAIL PROTECTED] Subject: BUG using left join. Hi, I think I may have spotted a bug in connection with the LEFT JOIN statemen

Re: ENUM Default values on NULL

2002-04-12 Thread Steve Katen
Ruben, If you leave it as NOT NULL it should default to NO. "If an ENUM is declared NOT NULL, the default value is the first element of the list of allowed values." SIDE QUESTION: Are you doing something like: select * from table where enum_colum="NO" If you are running that type of query it

RE: Access Denied

2002-04-12 Thread BJ Phillips
http://www.mysql.com/downloads/api-dbi.html -Original Message- From: Jane Tsai [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 9:12 AM To: Steven Hajducko Cc: [EMAIL PROTECTED] Subject: Re: Access Denied Steve, Thanks for help. To unpack the test/benchmarks RPM files: rpm -i

Re: ENUM Default values on NULL

2002-04-12 Thread Ruben I Safir
sql > > ENUM can handle your needs. you should be able to just change your syntax > > to: FIELD ENUM('NO','YES') NULL > > > > under that syntax your default value will be NULL. > > > I need it to default to 'NO' not NULL -

RE: A small SQL query problem

2002-04-12 Thread Roger Baklund
* Torkil Johnsen > This works PERFECTLY > Except: > If an article has NO comments, it is not returned! Use a LEFT JOIN: SELECT a.title,a.date,a.author,a.summary,COUNT(c.id) as comments FROM articles as a LEFT JOIN article_comments as c ON a.id = c.article_id GROUP BY a.title,a.date

Re: A small SQL query problem

2002-04-12 Thread John Klein
[EMAIL PROTECTED] wrote: > > Thanks for the suggestion! I modified your query to something that works for > me (I was inaccurate with the column names before, sorry... :) > > SELECT a.article_id,a.title,a.date,a.summary,COUNT(c.id) as comments > FROM articles as a,article_comments as c > WHERE a

BUG using left join.

2002-04-12 Thread Steve Briant
Hi, I think I may have spotted a bug in connection with the LEFT JOIN statement. The following SQL select name, sum(repurchasedunits) from t_fund left join t_boxdaily on t_fund.fundid = t_boxdaily.fundid where t_fund.fundid = 'BB01' group by name produces the output as below: namemax(boxd

Re: Access Denied

2002-04-12 Thread Jane Tsai
Steve, Thanks for help. To unpack the test/benchmarks RPM files: rpm -i MySQL-bench-3.23.49a.-1.i386-rpm Error: failed dependences: MySQL-DBI-perl-bin is need by MySQL-bench-3.23.49a-1.i386. If I'm not wrong, I need DBI-perl-bin-0.93-1.i386.rpm as well? Do you know where I can get the copy?

Re: Re: unkown table is full

2002-04-12 Thread Sinisa Milivojevic
Richard Clarke writes: > There is plenty of space. In excess of 5 gigs. > > Ric > Hi! The error message that you get is quite unlikely for temporary tables. Which release of MySQL 3.23 have you used ?? If not recent, then try the latest and see if problem reccurs. If this happens with last

Re: A small SQL query problem

2002-04-12 Thread Torkil Johnsen
Thanks for the suggestion! I modified your query to something that works for me (I was inaccurate with the column names before, sorry... :) SELECT a.article_id,a.title,a.date,a.summary,COUNT(c.id) as comments FROM articles as a,article_comments as c WHERE a.article_id = c.article_id GROUP BY a.ar

Re: ENUM Default values on NULL

2002-04-12 Thread Ruben I Safir
> ENUM can handle your needs. you should be able to just change your syntax > to: FIELD ENUM('NO','YES') NULL > > under that syntax your default value will be NULL. We need it to default to 'NO' not NULL sql Ruben - Before p

Re: mysqldump

2002-04-12 Thread ds
On Fri, 2002-04-12 at 16:39, Steve Buehler wrote: > Not a bad Idea. I guess I will have to hit the php mailing list to find > out about this because I tried the following in PHP and it still did the > same thing. > require("../globals.inc"); > $test=passthru("mysqldump -q -u$userName -p$passwo

Re: ENUM Default values on NULL

2002-04-12 Thread Steve Katen
ENUM can handle your needs. you should be able to just change your syntax to: FIELD ENUM('NO','YES') NULL under that syntax your default value will be NULL. this is from the documentation directly: "If an ENUM is declared NULL, NULL is also a legal value for the column, and the default value

Re: Load Blancing Mysql Max Db Server Between 2 Servers

2002-04-12 Thread Russell E Glaue
If your database is read-only, you can use Linux Virtual Server to load balance traffic to MySQL servers. -RG On Fri, 12 Apr 2002, Frankie Gravato wrote: > Date: Fri, 12 Apr 2002 10:54:56 -0400 > From: Frankie Gravato <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: Load Blancing Mysql M

Referenced a Table Dynamically in a SELECT statement

2002-04-12 Thread Jonathan David Edwin Wright
Hiya, I'm writing some code for a web site I'm working on at the moment, and I'm wondering if I can simplify a task: I've got a series of tables: items, books, video, data & music (it's a simply library web site). Every book, dvd, etc has an entry in it's selected table, and a record for eac

Re: mysqldump

2002-04-12 Thread Steve Buehler
Not a bad Idea. I guess I will have to hit the php mailing list to find out about this because I tried the following in PHP and it still did the same thing. ", $test); echo "$test"; ?> I can't seem to get the "passthru" into a variable. It always displays the results instead. Thank You Stev

Re: ENUM Default values on NULL

2002-04-12 Thread Ruben I Safir
sql > > Hello > > I need a ENUM to default to a value when it gets a NULL. > > Can this be done. Right now is I set the column to > FIELD ENUM('NO','YES') NOT NULL > > It fails to insert when a NULL is entered. > > I want it to default to NO > > > Can I set it to do this? > > Ruben >

Re: Re: unkown table is full

2002-04-12 Thread Richard Clarke
There is plenty of space. In excess of 5 gigs. Ric - Original Message - From: "Victoria Reznichenko" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, April 12, 2002 2:02 PM Subject: Re: Re: unkown table is full > Richard, > Friday, April 05, 2002, 12:29:44 AM, you wrote: > > R

RE: A small SQL query problem

2002-04-12 Thread Roger Baklund
* Torkil Johnsen [...] > I have no problems displaying the title, date, author, summary of the > articles or anything. Its just doing an sql query that gets my 3 latest > articles AND counts how many comments each article has, and doing > it in ONE query instead of two separate ones... :( [...] >

Re: mysqldump

2002-04-12 Thread Jason Yates
On Fri, 2002-04-12 at 10:56, Steve Buehler wrote: > I am using PHP to run the following command: > passthru("mysqldump -q -u$userName -p$password -h$hostName $databaseName"); > > The problem is that it puts EVERYTHING on one line and, of course, and > wraps it. I want to be able to dump the dum

RE: is there a MySQL 'field contains' function

2002-04-12 Thread Roger Baklund
* Bill > Hello Everyone, > I've only just started trying to use MySQL so please forgive my > ignorance if this sounds like a really basic question! > I am trying to search a text field within a table that contains > several keywords; for example the column might be called > "computer_d

mysqldump

2002-04-12 Thread Steve Buehler
I am using PHP to run the following command: passthru("mysqldump -q -u$userName -p$password -h$hostName $databaseName"); The problem is that it puts EVERYTHING on one line and, of course, and wraps it. I want to be able to dump the dump(schema) of a database onto a web page so that they can vi

Load Blancing Mysql Max Db Server Between 2 Servers

2002-04-12 Thread Frankie Gravato
Hello Fellow Mysql Users Is Mysql Max Data Base Server even possible to do loadblancing to spread its load between 2 or more machines. I'm having tough time getting my mysql to work under heavy site load on Dual Cpu FreeBSD 4.5 machine running Mysql max. Any insight would help me at this point. t

Access denied errors not shown in SHOW SLAVE STATUS

2002-04-12 Thread mdev
>Description: Access denied errores, for the replication user, are not reported in: SHOW SLAVE STATUS; They show all relevant information, and queries like: CHANGE MASTER TO report no error. Subsequent LOAD TABLE % FROM MASTER queries, hang indefinetely. >H

Re: is there a MySQL 'field contains' function

2002-04-12 Thread BD
At 10:09 AM 4/12/2002, you wrote: >Hello Everyone, > I've only just started trying to use MySQL so please forgive my > ignorance if this sounds like a really basic question! > I am trying to search a text field within a table that contains > several keywords; for example the colu

Re: See complete SQL sentence in mysqladmin process

2002-04-12 Thread Dan Nelson
In the last episode (Apr 12), Iago Sineiro said: > Hi. > > When I use mysqladmin process I see the SQL sentence that is executed at > that moment in the column Info. "mysqladmin -v process" will display the entire commandline. -- Dan Nelson [EMAIL PROTECTED] --

A small SQL query problem

2002-04-12 Thread Torkil Johnsen
A small SQL query problem concerning articles and article_comments :) You experts will have no problem with this :) In brief: - I have no problems displaying the title, date, author, summary of the articles or anything. Its just doing an sql query that gets my 3 latest articles AND count

How to update a column with a column from another table?

2002-04-12 Thread BD
Is there a fast way to update a column in one table with the column value in another table? Here's the catch. I need to do this for up to 10,000 rows. I would like to do this with one sql statement rather than writing a PHP loop to do it. I have 2 tables, Dept and Employee. I want to count the #

RE: is there a MySQL 'field contains' function

2002-04-12 Thread Gregory Junker
SELECT * FROM table1 WHERE computer_description LIKE '%blue%' HTH Greg > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Friday, April 12, 2002 11:10 AM > To: [EMAIL PROTECTED] > Subject: is there a MySQL 'field contains' function > > > Hello Everyone, >

Re: is there a MySQL 'field contains' function

2002-04-12 Thread John Klein
[EMAIL PROTECTED] wrote: > > I am trying to search a text field within a table that contains > several keywords; for example the column might be called > "computer_description" and contain the values "i-mac blue 256MB > 500MHz ...". Is there any way of putting together a query that says >

Locking tables

2002-04-12 Thread Carl Schmidt
I understand that at some point, a sql table that has been locked by someone will automatically be unlocked, but I'm a little unclear as to the circumstances. Say at the beginning of a function I open a connection, lock a table, and then close the connection. Then, perhaps a few lines down in th

Multilinguality

2002-04-12 Thread Michael Bacarella
Check this out. Sometimes I need to display dates to users. DATE_FORMAT is neato way to process DATE columns into more readable output (2002-03-12 for example, doesn't cut it for me), but it prints out the date in English. On a site that is presented in 5 different languages, this is much less u

RE: is there a MySQL 'field contains' function

2002-04-12 Thread Svensson, B.A.T. (HKG)
> Hello Everyone, > I've only just started trying to use MySQL so please forgive my > ignorance if this sounds like a really basic question! > I am trying to search a text field within a table that contains > several keywords; for example the column might be called > "computer_descr

  1   2   >