Query with avg on last 60 entries

2001-11-13 Thread Chris Aitken
I have come up with a bit of a problem which I cant seem to work out... I have a table that gets updated every minute with data. The table has 3 fields in it... id, date, number what im trying to do with a single query is, select the last 60 records, and output the average of the number field w

Re: OT: Securing username and password in script file

2001-11-13 Thread Gordon Burditt
>I did not mean for this to be an off-topic PHP post, what I was noodling >about here was a mySQL means to provide a more secure access for >scripting languages like Perl, Python and PHP - which end up with >insecure username and password config files all over the Internet. There's a problem here

Performance problems

2001-11-13 Thread Daniel Andersen
Hi, I'm running mysql 3.23.42 on a 1.4ghz athlon with 512mb of ram for my database server but this machine doesn't seem to be able to handle the load, which makes me think i must be doing something wrong. The primary job of this database is radius authentication for our 30k or so customers so it i

RE: File permissions

2001-11-13 Thread Chris Book
set your /home/Venu/ directory to be readable by all users: chmod 755 /home/Venu This has security issues but at least it'll fix your problem :) Chris -Original Message- From: Venugopal Allavatam [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 1:40 PM To: [EMAIL PROTECTED] S

RE: search engine in 3.23.32

2001-11-13 Thread Chris Book
Use the php function 'explode' to seperate words based on spaces into an array, and then go through your list checking the length of each word. Chris -Original Message- From: Craig Issod [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 10:44 PM To: [EMAIL PROTECTED] Subject: s

mysqldump and a running mysql

2001-11-13 Thread Chris Aitken
Hi all, Just a real quick question about using mysqldump. Should I shutdown mysql before running mysqldump, or can I successfully do a mysqldump of my whole database while mysql is still running/processing records. I have a very big database, and want to go a daily dump backup, but I really

Commands out of sync error when check tables

2001-11-13 Thread sj
hi, I execute two check command using C, it report "Command out of sync error". the original statement is as below: sprintf(ls_sql, "check table aa"); mysql_real_query(dbfd, ls_sql, strlen(ls_sql)); num = mysql_affected_rows(dbfd); sprintf(ls_sql, "check table bb"); mysql_real_qu

Lock Table for new index?

2001-11-13 Thread Karl J. Stubsjoen
Hello, I have a fairly active and large DB. I need to create a new index on a column. It will take (just guessing) 15-30 minutes for the entire creation. I've got different people hittiing this table all the time, mostly with new inserts (not really any updates). My question is: Can I create

Basic index questions

2001-11-13 Thread Christian Stromberger
I understand that an index is used to "speed stuff up", but am foggy on the details. Eg, let's say I have an "authors" table with fname, mname, and lname fields for first, middle and last names. Plus an auto_increment primary key. I will want to sort on author last name for output of sorted aut

Boolean column type?

2001-11-13 Thread Christian Stromberger
Is a boolean column type possible in mysql? If not, what's the most common column type for true/false (or true/false/null) flags? Thanks, Chris - Before posting, please check: http://www.mysql.com/manual.php (the manu

what wrong with my database? or mysqlcheck? myisamchk?

2001-11-13 Thread sj
My mysql is 3.23.42 I use the mysqlcheck -A to check my database first, it report ok and then I try the myisamchk use it as: myisamchk /var/lib/mysql/*/*.MYD it report: myisamchk: error: -1 when opening MyISAM-table '/var/lib/mysql/xx/dd.MYD' myisamchk: error: '/var/lib/mysql/xx/cc.MYD' doesn

how to make LOCATE & other functions case-insensitive?

2001-11-13 Thread Bennett Haselton
MySQL documentation says that CHAR and VARCHAR types are case-insensitive: http://www.mysql.com/doc/C/H/CHAR.html But I have a table with a column of type VARCHAR(255), and if I do a query like select * from user where LOCATE('Bennett', emailaddress) > 0; then the results are computed

RE: Alphabetizing book titles

2001-11-13 Thread Christian Stromberger
Is there any way to build an index like this (to ignore A, An, The) for faster title sorts? Any helpful advice for a newbie appreciated! -Chris > -Original Message- > From: Denis Rudakov [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 13, 2001 2:03 AM > To: [EMAIL PROTECTED] > Subj

search engine in 3.23.32

2001-11-13 Thread Craig Issod
I'm running into the problem of word length shorter than 3 characters not being accepted in this version of FULLTEXT searches. Example at: http://www.hearth.com/search/index.php (use fuzzy search at bottom)... I can't recompile now, and also don't have the technical ability to create a complica

OpenSSL using v4.0.0?

2001-11-13 Thread Lou Picciano / Essex Systems
Hello all - Does anyone know any tricks for compiling v4.0.0 ‹with-openssl? I¹ve tried several variations, including different paths (or no path) in the ‹with-openssl=/what/path/here? argument. Whatever I enter, configure output usually indicates it¹s _not_ using OpenSSL. After the compile an

MySQL and TimeHost domain server

2001-11-13 Thread Bob King
I've just recently discovered MySQL and I will be using it with domains hosted by TimeHost (www.timehost.com). I was wondering if any of the other readers/users on this list have any experience with TimeHost and the various settings to use MySQL with Perl in that environment. (I have 2 domains -

HELP - Setting up MySQL on Mac OS X 10.0.4

2001-11-13 Thread Brandon Pearcy
Hi Everyone, Has anyone successfully set up MySQL on Mac OS X 10.0.4 yet? If so, what distribution did you use? What special steps (if any) did you have to take? Every tutorial on this topic that I've found on the web so far, is either outdated or has simply has not worked for me. Thanks i

Re: failer to start the mysql server

2001-11-13 Thread Erik Price
I had this same error message yesterday when I first set up MySQL. Two possible reasons: 1) Is mysqld running? I used bash2.05$ ps aux | grep mysqld to see if there is a process called "mysqld". 2) In my installation (which I compiled from source, with the Unix socket path option in configur

failer to start the mysql server

2001-11-13 Thread R.Neubert
Hello I have a RedHat 7.2 running with mysql installation, but the mysql start not. My version: mysqladmin Ver 8.21 Distrib 3.23.41, for redhat-linux-gnu on i386 and this is wrong: [root@linux mysql]# mysqladmin reload mysqladmin: connect to server at 'localhost' failed error: 'Can't connec

RE: Storing returned string into variable in C

2001-11-13 Thread Quentin Bennett
Hi, Don't you mean strcpy(reseller_prompts, row[0]); not strcpy(row[0], reseller_prompts); Quentin -Original Message- From: Matthew Blacklow [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 14 November 2001 1:30 p.m. To: [EMAIL PROTECTED] Subject: Storing returned string into variable in C

Storing returned string into variable in C

2001-11-13 Thread Matthew Blacklow
I am having trouble storing the result of a query into a variable when the query returns a string. Using phpmyadmin I test the query and it definitely works. So knowing that the problem does not lie in the query. My code contains several other queries all of which work, the only difference is that

RE: Introducing hidden row having duplicated primary key

2001-11-13 Thread Quentin Bennett
Hi, Yes - REPLACE is just INSERT with the ability to pre-delete if a UNIQUE key clash is found. This means that you would have to specify all the columns (even if they already had values in them). Update will update records that match the where, changing only the specified columns. HTH Quentin

mysqld shutdown

2001-11-13 Thread Erik Price
All, Well, I solved the mystery of the missing Unix socket. It needs to be defined at the time the daemon is started with: --socket=/path/to/socket. Well, at least in my installation it does. But now I'm having the OPPOSITE problem -- shutting down the server (the daemon). I've searched the

RE: File privileges?!

2001-11-13 Thread Quentin Bennett
Hi, error 13 is permission denied Remember that the full paths to files are for the server, and the 'user' running the server must have permission to read/write the file as required, not (necessarily) the user running the client. Quentin -Original Message- From: Venugopal Allavatam [ma

loading data into a table and 1->many relations

2001-11-13 Thread Saqib Shaikh
Hi, I'm having a problem as follows: In my database (which just needs to work rather than be of commercial quality) I have an orders table. Each order contains an order number and a reference to ordered_items. Ordered_items table contains things like the name of the product and the price. Now

Link between tables.

2001-11-13 Thread Venugopal Allavatam
Hello All, I need your help with the following: I have two tables: create table_no1 ( key_no1 int unsigned auto_increment not null, field_no1 int unsigned not null ); create table_no2 ( key_no1 int unsigned not null, key_no2 int unsigned primary key auto_increment not null, field_no2 int unsign

File privileges?!

2001-11-13 Thread Venugopal Allavatam
Hello all, I am trying to insert the contents of a binary file into a blob data type using simple insert statement and the load_file(filename) function. Initially, the function was returning a NULL value. But eventually, I changed the 'File_priv' in the user table of mysql database to 'Y'. Now I

Re: order by, group by

2001-11-13 Thread Christan Andersson
> > > 1'en''blue circle''this is a blue ' > > > 1'no''bla cirkel' 'dette er ei bla cirkel' > > > 2'en''green leaf' 'this is a green leaf from a tree' > > > 2'sv''grönt löv' 'detta är ett grönt löv från ett träd' > > > > > > if the language priority

Re: Introducing hidden row having duplicated primary key

2001-11-13 Thread Jeremy Zawodny
On Tue, Nov 13, 2001 at 10:04:22PM +0100, Martin MOKREJS wrote: > On Tue, 13 Nov 2001, Gerald Clark wrote: > > > Looks correct to me. > > What do you think is the problem? > > > > 2 rows were affected by the replace. > > One row was deleted, and one was inserted, > > Both rows had a value of 'tes

Idea about extending Limit/mysql query

2001-11-13 Thread Christian Andersson
I'm not sure if this is a good idea or bad, but I have one idea about the Limit funtionallity (which incidently might solve my order by, group by problem :-) I KNOW that it is NOT possible to do this now, so no RTFM :-) this is just an idea.. LIMIT is as I understand it something that is mysql

Re: How to Get the New Number inserted in a AutoIncrement Field

2001-11-13 Thread Robert Alexander
http://www.mysql.com/doc/G/e/Getting_unique_ID.html HTH, /Rob >I know that this is a old question, but >I really need to know how can I get the >number that Mysql use in a autoincrement field >of a record I just inserted ... >Is there any function like LAST_INSERTED or >something like that ...

Re: order by, group by

2001-11-13 Thread DL Neil
> > let say that the table (id,language,name,description) where id,language is > > the primary key so that 1 id can have several languages > > > > the data in the database looks like this > > > > 1'en''blue circle''this is a blue ' > > 1'no''bla cirkel' 'dette er ei bla ci

Re: Search Engines

2001-11-13 Thread Robert Alexander
Hello Karl, Try the 'FULLTEXT' section of the manual. I've used the fulltext index to create a search engine for a mailing list archive, and I'm quite pleased with how it works. http://www.mysql.com/doc/F/u/Fulltext_Search.html /Rob "Karl J. Stubsjoen" wrote: > Hello, > > I need to create a

Re: Solution for testing PHP/MS Access on Linux

2001-11-13 Thread Arjen G. Lentz
Hi, - Original Message - From: "mweb" <[EMAIL PROTECTED]> > some days ago I asked help on this list because I have to develop > and test on Linux/Apache some PHP pages that will have to run on > on an IIS/NT box. Regarding wrappers, have a look at http://php.weblogs.com/ADODB The ADODB

Re: Show query page by page

2001-11-13 Thread Robert Alexander
>Hi, > >I have a query result with 50 register and i want to show them in 5 pages, >every page show 10 register. > >Thanks , for your answers >Rhony http://www.mysql.com/doc/S/E/SELECT.html See 'LIMIT' /Rob -- Robert Alexander, Alpha Geek, Workmate.ca WWW Database Applications and Web Hosting

How to Get the New Number inserted in a AutoIncrement Field

2001-11-13 Thread ROGGER ALEXIS VASQUEZ MARTINEZ
I know that this is a old question, but I really need to know how can I get the number that Mysql use in a autoincrement field of a record I just inserted ... Is there any function like LAST_INSERTED or something like that ... Thanks a lot ---

RE: myisamchk -a + indexes + hidden...?

2001-11-13 Thread Jon Gardiner
Analyzing a table requires looking at every record in the table. If the table you are dealing with is a large one then there is a good chance that after analyzing the table your disk cache will not contain the records that you are trying to grab. Once you run the query it will almost certainly c

Re: Timezone offset question

2001-11-13 Thread DL Neil
> >Start the server with the desired TZ set. > > That's all fine and good, but difficult switch back and forth every 10 > minutes while that query runs for local data, then for the remote data. =Agreed you must stick with either one or the other, right? =Wrong! To fix the problem of different of

Re: Search Engines

2001-11-13 Thread Bill Adams
"Karl J. Stubsjoen" wrote: > Hello, > > I need to create a search engine out of a few MySQL tables I should > say: I need to search MySQL records like a search engin might. However, my > first go ended up as a complete failure because it is highly un-optimized to > search for (as an exampl

Re: Show query page by page

2001-11-13 Thread Jeremy Zawodny
On Tue, Nov 13, 2001 at 04:24:47AM -0500, Auri Net SAC wrote: > Hi, > > I have a query result with 50 register and i want to show them in 5 > pages, every page show 10 register. Then you want to use the LIMIT option on your SELECT queries as shown in the manual. Jeremy -- Jeremy D. Zawodny, <[

Re: Show query page by page

2001-11-13 Thread Bill Adams
Auri Net SAC wrote: > Hi, > > I have a query result with 50 register and i want to show them in 5 pages, > every page show 10 register. LIMIT (see the manual) will help you. b. mysql - Before posting, please check: http:/

Re: Same table aliased twice causes infinite loop

2001-11-13 Thread Bill Adams
Sinisa Milivojevic wrote: > Nick de Voil writes: > > I am running MySQL 3.23 on Windows 2000. > > > > I have a SQL statement which looks fine to me, although it does reference > > the same table twice. > > > > Here it is: > > > > SELECT DISTINCT u.inserted_usr_id, g.inserted_ugp_id FROM raw_users

Re: Timezone offset question

2001-11-13 Thread Bill Adams
Jeremy Wilson wrote: > At 01:07 PM 11/13/01 -0600, Gerald Clark wrote: > >Start the server with the desired TZ set. > > That's all fine and good, but difficult switch back and forth every 10 > minutes while that query runs for local data, then for the remote data. The way I deal with it (and I d

Re: table corrupted after an error free load

2001-11-13 Thread Bill Adams
Riccardo Cohen wrote: > Hi, > Sorry to disturb, but I cannot find any answer in online doc and web archive. > > >Description: > I insert 34000 rows in a simple table with all text fields, and myisamchk >tells the table is corrupted, while a select into outfile does not give any error >c

myisamchk -a + indexes + hidden...?

2001-11-13 Thread Bill Adams
It seems like myisamchk -a is hosing some statistic in a MyISAM table that gets re-created and stored permanently as once a query is run that uses that index, it always runs well until myisamchk -a is run again even between restarts of mysqld. It also seems that key_buffer_size has no effect on t

replication errors (broken binlog-do-db?)

2001-11-13 Thread wrath
>Description: I have two DB servers that we will simply call MASTER and SLAVE. MASTER is started with --binlog-do-db=DB1 so that only DB1 will be replicated to SLAVE. When SLAVE is initially started everything seems normal, in that all update/delete/insert/etc. queries are propogated to

Re: Cannot add blob data to innodb table

2001-11-13 Thread William R. Mussatto
On Mon, 12 Nov 2001, Heikki Tuuri wrote: > Date: Mon, 12 Nov 2001 09:06:42 +0200 > From: Heikki Tuuri <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: Re: Cannot add blob data to innodb table > > Steve, > > >Date: Mon, 12 Nov 2001 08:52:54 > >To: [EMAIL PROTECTED] > >From: Heikki Tuuri <[

Re: update from table x to table y

2001-11-13 Thread DL Neil
=No there isn't, because: 7.24 UPDATE Syntax UPDATE [LOW_PRIORITY] [IGNORE] tbl_name SET col_name1=expr1, [col_name2=expr2, ...] [WHERE where_definition] [ORDER BY ...] [LIMIT #] - there is only 'space' for one tbl_name in the UPDATE clause. =I've had a quick look around. I'm su

Show query page by page

2001-11-13 Thread Auri Net SAC
Hi, I have a query result with 50 register and i want to show them in 5 pages, every page show 10 register. Thanks , for your answers Rhony - Before posting, please check: http://www.mysql.com/manual.php (the manual) h

Re: order by, group by

2001-11-13 Thread Shankar Unni
Christan Andersson wrote: > what I really want is the following.. > let say that the table (id,language,name,description) where id,language is > the primary key so that 1 id can have several languages > > the data in the database looks like this > > 1'en''blue circle''this is a blu

Re: how to do increments in parallel

2001-11-13 Thread Jeremy Zawodny
On Mon, Nov 12, 2001 at 11:29:48PM -0800, Jeremy Zawodny wrote: > On Mon, Nov 12, 2001 at 10:52:39PM -0800, Bennett Haselton wrote: > > Say I have two running programs and both of them periodically want to > > increment a value in a database. How can I do this so that the increments > > will be

Re: Introducing hidden row having duplicated primary key

2001-11-13 Thread Jeremy Zawodny
On Tue, Nov 13, 2001 at 12:45:17PM -0800, Jeremy Zawodny wrote: > On Tue, Nov 13, 2001 at 08:53:09PM +0100, Martin MOKREJS wrote: > > Hello, > > > > I think I've found a bug. Just by playing with REPLACE and INSERT, > > the following happened. I'm including full log, demonstrating that I > > don

Re: Introducing hidden row having duplicated primary key

2001-11-13 Thread Martin MOKREJŠ
On Tue, 13 Nov 2001, Gerald Clark wrote: > Looks correct to me. > What do you think is the problem? > > 2 rows were affected by the replace. > One row was deleted, and one was inserted, > Both rows had a value of 'test' for column 'Tab'. Cool, thanks to Jeremy Zawodny and you, now I know even mo

Re: Introducing hidden row having duplicated primary key

2001-11-13 Thread Gerald Clark
Looks correct to me. What do you think is the problem? 2 rows were affected by the replace. One row was deleted, and one was inserted, Both rows had a value of 'test' for column 'Tab'. Martin MOKREJŠ wrote: > Hello, > I think I've found a bug. Just by playing with REPLACE and INSERT, the > fo

Re: My Book (WAS Re: MySQL Developer's Handbook)

2001-11-13 Thread Jeremy Zawodny
On Tue, Nov 13, 2001 at 02:20:59PM -0500, Bob Hall wrote: > > Can I request that you include a chapter on using MySQL with > FreeBSD? If I recall correctly, that's something you should be able > to write about. I probably should talk about some specific OS issues. I'll have to look at the outli

Re: Introducing hidden row having duplicated primary key

2001-11-13 Thread Jeremy Zawodny
On Tue, Nov 13, 2001 at 08:53:09PM +0100, Martin MOKREJS wrote: > Hello, > > I think I've found a bug. Just by playing with REPLACE and INSERT, > the following happened. I'm including full log, demonstrating that I > don't understand sql at all. ;-) Can someone explain me what "2 rows > affected

Re: order by, group by

2001-11-13 Thread Christan Andersson
> >will return all articles even if they do not have an english translation, > >BUT here is the problem.. which language will be the one I recieve? > >Svedish? english? French? > > > There seems to be a little confusion here regarding grouping and > ordering. What do you mean by "the one I receive

Re[2]: Access to MYSQL via ODBC?

2001-11-13 Thread SAE's System Administrator
Hello Carsten, Tuesday, November 13, 2001, 9:48:56 PM, you wrote: CHP> Try running w/o -p cleopatra:/usr/bin # mysql -h localhost -u root ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO) ;( -- Best regards, SAE's System Administrator [EMAIL PROTECTED] World Coun

Introducing hidden row having duplicated primary key

2001-11-13 Thread Martin MOKREJŠ
Hello, I think I've found a bug. Just by playing with REPLACE and INSERT, the following happened. I'm including full log, demonstrating that I don't understand sql at all. ;-) Can someone explain me what "2 rows affected" means? How can I select the second row from the table? How can I delete it

RE: Access to MYSQL via ODBC?

2001-11-13 Thread Carsten H. Pedersen
> cleopatra:/usr/bin # mysql -h localhost -u root -p > Enter password: > ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO) > cleopatra:/usr/bin # mysql -h localhost -u root -p > Enter password: > ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES) Tr

Cannot access my MySQL

2001-11-13 Thread SAE's System Administrator
Hello all, I just installed a Suse 7.2 Linux, with MySql.. MySQL runs, but when i try to access it, i get the following message: cleopatra:/usr/bin # mysql -h localhost -u root -p Enter password: ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO) cleopatra:/usr/bin # mysql

Re: File permissions

2001-11-13 Thread Gerald Clark
the mysql account under which the server runs does not have permission to read the file or its directory. Venugopal Allavatam wrote: > Hi All! > i tried the load_file after changing the File_priv in the user table of > mysql database for a particular user 'user1'... > > insert into ecg_datafi

Re: Hot Backups

2001-11-13 Thread Matthew Costello
If your database is large enough then any sort of hot backup will lock the tables for too long. The method I use is to use LVM to take a snapshot of the MySQL partition while MySQL is stopped. All my attempts to snapshot a live MySQL database resulted in inconsistent results... The following is

Re: Same table aliased twice causes infinite loop

2001-11-13 Thread Sinisa Milivojevic
Nick de Voil writes: > I am running MySQL 3.23 on Windows 2000. > > I have a SQL statement which looks fine to me, although it does reference > the same table twice. > > Here it is: > > SELECT DISTINCT u.inserted_usr_id, g.inserted_ugp_id FROM raw_users u, > raw_data d, raw_groups g, raw_groups

Can't Compile DBD::mysql

2001-11-13 Thread josea
Hi Everybody There! I'm being tryng to install DBD::mysql but I ever get this answer, even I recompile perl with the same gcc in this same box, I wasn't the problem so the file 'blib/arch/auto/DBD/mysql/mysql.so' is there on the source tree. Has someboby an idea? Thanks in advance. -Jose Alb

Re: My Book (WAS Re: MySQL Developer's Handbook)

2001-11-13 Thread Bob Hall
On Mon, Nov 12, 2001 at 01:36:45PM -0800, Jeremy Zawodny wrote: > Just *today* I signed a contract with O'Reilly & Associates to write > "Advanced MySQL" which I've begun working on. The goal is to have it > out in the 2nd half of next year. We've been discussing it for a few > months now, and w

Joins with priority

2001-11-13 Thread Roger Baklund
Hi, I have two tables, and I want to join them based on some priority rules: If some special values exist in the joined subset, join all of those values, otherwise join the first occurence of some other special value, if that value also does not exist, join the first occurence of a third v

RE: Same table aliased twice causes infinite loop

2001-11-13 Thread Rick Emery
Yes, MYSQL allows the same table to be aliased twice or more in a select -Original Message- From: Nick de Voil [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 12:35 PM To: [EMAIL PROTECTED] Subject: Same table aliased twice causes infinite loop I am running MySQL 3.23 on Win

RE: Permission problem

2001-11-13 Thread Harpreet
I typed show Grants for root@localhost; and saw that the root has all permissions other then select. I can delete , insert data into the tables of all the databases but cannot select. How can i give the root@localhost 'select' permissions. show grants for root@localhost displays: Grant insert,upd

Re: Timezone offset question

2001-11-13 Thread Jeremy Wilson
At 01:07 PM 11/13/01 -0600, Gerald Clark wrote: >Start the server with the desired TZ set. That's all fine and good, but difficult switch back and forth every 10 minutes while that query runs for local data, then for the remote data. -

Re: Access to MYSQL via ODBC?

2001-11-13 Thread SAE's System Administrator
Hello all, I just installed a Suse 7.2 Linux, with MySql.. MySQL runs, but when i try to access it, i get the following message: cleopatra:/usr/bin # mysql -h localhost -u root -p Enter password: ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO) cleopatra:/usr/bin # mysq

Re: Timezone offset question

2001-11-13 Thread Gerald Clark
Start the server with the desired TZ set. Jeremy Wilson wrote: > I have a data collection script which rolls raw data into a formatted > table, based on year/month/day. I've been requested to roll up this raw > data based on a different timezone - 3 hours behind - to better coincide > with rep

Re: order by, group by

2001-11-13 Thread Shankar Unni
Christan Andersson wrote: >lets say that I have this table.. articles(id,language,name,description) >what I would like to do is retrieve 1 row per unique id in the chosen >language > >select * from articles where language='en'; > >that is quite simple, unfourtunally, not all articles have the de

max_connect_errors & security behind a firewall

2001-11-13 Thread Pedro
What is the security concerns about incresing the number of max_connect_errors? And if I am behind a firewall and the server is only accessed by only one machine, in the case it=B4s accessed only by the webserver. I have to admit that I dont understand the purpose of a too low default number for

binlog to a full disk loses updates

2001-11-13 Thread root
>Description: Writing to the binlog doesn't stall the update process when the disk is full. >How-To-Repeat: Turn on binlogging. Fill the disk. Do a few updates. Flush logs. Observe binlogs looking like this: -rw-rw1 mysqlm

File permissions

2001-11-13 Thread Venugopal Allavatam
Hi All! i tried the load_file after changing the File_priv in the user table of mysql database for a particular user 'user1'... insert into ecg_datafile values(1,1,load_file('/home/Venu/fr1w.jpg')); ERROR 13: Can't get stat of '/home/Venu/fr1w.jpg' (Errcode: 13) i get the following error, can a

Same table aliased twice causes infinite loop

2001-11-13 Thread Nick de Voil
I am running MySQL 3.23 on Windows 2000. I have a SQL statement which looks fine to me, although it does reference the same table twice. Here it is: SELECT DISTINCT u.inserted_usr_id, g.inserted_ugp_id FROM raw_users u, raw_data d, raw_groups g, raw_groups gg WHERE u.forename = d.forename AND u

Re: how to do increments in parallel

2001-11-13 Thread Tore Van Grembergen
The solution is fairly easy. In you update statement you place something like this : update table set valuefield = newvalue where keyfield = key and valuefield = oldvalue after the update you check affected rows. if affected rows = 0 then it means that somebody else already changed the valuefiel

RE: [PHP] Access to MYSQL via ODBC?

2001-11-13 Thread Curtis Maurand
There are scripts available at MySQL.com to perform the task. Curtis On Tue, 13 Nov 2001, mweb wrote: > GREAT, THANK YOU! > > Now the only step left is how to convert (on Linux) the MS access > database to MySQL...How? > > mweb > > > -- Initial message --- > >

Re: Access to MYSQL via ODBC?

2001-11-13 Thread Curtis Maurand
The last time I checked, the windows version of PHP had MySQL support built in. Curtis On Tue, 13 Nov 2001, mweb wrote: > Hello, > > apart from performance issues, is it possible in PHP to read/write a > MYSQL DB not directly, but via ODBC? The reason (as states in my other > message "MS AC

Permission problem

2001-11-13 Thread Harpreet
I created a new database on mysql server using Telnet. Before creating it i could log onto telnet as su root and select,delete , insert data into the mysql database and every other database. After creating this new database now when i try to type in USE MYSQL, it changes to the mysql database . An

RE: Access to MYSQL via ODBC?

2001-11-13 Thread Peter Harvey
Look for unixODBC on http://www.sourceforge.com Peter -Original Message- From: mweb [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 7:23 AM To: phplist; mysqllist Subject: Access to MYSQL via ODBC? Hello, apart from performance issues, is it possible in PHP to read/write

RE: UTF-8

2001-11-13 Thread Daniel ?a?
Hi Yes I do. There is no problem with this, except sorting etc. Bu search is ok. Regards Daniel Las > -Original Message- > From: Dana Sharvit [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 13, 2001 6:35 PM > To: '[EMAIL PROTECTED]' > Subject: UTF-8 > > > If I understand correctl

Re: why ever use TINYBLOB/TEXT -- isn't VARCHAR same size? (fwd)

2001-11-13 Thread Robert Alexander
At 16:07 + 2001/11/13, Carl Troein wrote: >//C - with a runny nose, a cup of tea, and a glass of Laphroaig ...for medicinal purposes, of course. :> My choice was McClellands, when reduced last week to a sorry-ass blob of protoplasm by the worst cold I've had in years. Feeling much better

Re: innodb inserts/select crash

2001-11-13 Thread Heikki Tuuri
Rich, a fix is to analyze the locking behavior of your database and try to find out why the locking SELECT has to wait long times. But I think the OUTFILE - INFILE trick is easier. Inside MySQL the fix would be to log individually rows inserted by CREATE ... SELECT ... But I am not responsible f

UTF-8

2001-11-13 Thread Dana Sharvit
If I understand correctly I can load data in UTF-8 to a MySql database that was compiled with character set (Latin-1). In all of the documentation that I looked at there is an indication that due to the lack of direct Unicode support in MySQL the use of the data which is stored in UTF-8 will be p

Re: order by, group by

2001-11-13 Thread Christian Andersson
> > Im trying to make a "data" system that is language-independent, ie the data > > stored can have any language therefore the same information is stored > > several times but with different values (depending on language) > > =Is this correct? > "data" ~ news reports/magazine articles > "article"

Re: why ever use TINYBLOB/TEXT -- isn't VARCHAR same size?

2001-11-13 Thread Aaron Williams
At 4:07 PM + 11/13/01, Carl Troein wrote: >Carsten H. Pedersen writes: > >> I assume that there is a small speed penalty in using TEXT/BLOB >> fields, as compared to VARCHARs. > >I recall seeing some test where TEXT was actually faster, but >it might have been in some special situation. On t

RE: Hash Tables / Indexes

2001-11-13 Thread Norman L. Smith
> From: Karl J. Stubsjoen > Imagine: a table with over 200,000 records in it and one of > the fields in > the table is a keywords field. Keywords seperated by commas. > The keyword > field is a collection of keywords that our clients use to identify the > content of their web pages. > What we

RE: How to decrement int field?

2001-11-13 Thread Alok K. Dhir
Update table set days_left = days_left- 1 where days_left > 0 [and other conditions]. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > m] On Behalf Of Gil G. > Sent: Tuesday, November 13, 2001 11:23 AM > To: [EMAIL PROTECTED] > Subject: How to decrement int f

RE: Securing username and password in script file

2001-11-13 Thread William R. Mussatto
Our php users run their scripts under their own username. this requires the performance hit of treating php like any other cgi script (no mod_php) but they are on a shared server because they are a low volume site. On Sun, 11 Nov 2001, Peter Lovatt wrote: > Date: Sun, 11 Nov 2001 10:20:11 -

Timezone offset question

2001-11-13 Thread Jeremy Wilson
I have a data collection script which rolls raw data into a formatted table, based on year/month/day. I've been requested to roll up this raw data based on a different timezone - 3 hours behind - to better coincide with reports from a company in that timezone. This is the rollup SQL query we cur

RE: [PHP] Access to MYSQL via ODBC?

2001-11-13 Thread Jonathan Hilgeman
The best way I've found to convert MS Access to mySQL is via ODBC. 1. Just set up ODBC on Windows (an easy install process - just run the install program that you can download from MS) 2. Install MyODBC (you can download this from MySQL's site - somewhere in their downloads section) 3. Go into

RE: How to decrement int field?

2001-11-13 Thread Rick Emery
UPDATE mytable SET myvalue = myvalue-1 WHERE some_condition -Original Message- From: Gil G. [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 10:23 AM To: [EMAIL PROTECTED] Subject: How to decrement int field? Hello, I would really appreciate some help on this, thanks! I hav

Re: How to decrement int field?

2001-11-13 Thread Carl Troein
Gil G. writes: > I have a colomn with days_left, an integer. I have to write a Perl > script to run on a cron job once a day and decrement all the fields > in that column by 1. Is there a query to do this? I'll leave the the cron job and perl script to you, but decrementing something is done

Re: innodb inserts/select crash

2001-11-13 Thread Richard Clarke
What does this mean. How can I fix it. It seems silly that I have to read data out just to write it back in again instead of using the create...select command. Rich - Original Message - From: "Heikki Tuuri" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 13, 2001 10:1

Re: order by, group by

2001-11-13 Thread DL Neil
> Im trying to make a "data" system that is language-independent, ie the data > stored can have any language therefore the same information is stored > several times but with different values (depending on language) =Is this correct? "data" ~ news reports/magazine articles "article" ~ a news repo

Re: order by, group by

2001-11-13 Thread Benjamin Pflugmann
Hi. If I understand correctly what you want to archieve, this is covered in the tutorial part of the manual: http://www.mysql.com/doc/e/x/example-Maximum-column-group-row.html and the short answer is "no, only with temporary tables, until sub-queries are implemented". Bye, Benjamin.

How to decrement int field?

2001-11-13 Thread Gil G.
Hello, I would really appreciate some help on this, thanks! I have a colomn with days_left, an integer. I have to write a Perl script to run on a cron job once a day and decrement all the fields in that column by 1. Is there a query to do this? Sincerely, Gil. -- http://planenews.com PGP pu

RE: QUERY HELP - IF THEN ELSE

2001-11-13 Thread Rick Emery
I'm trying to determine what you want displayed from your SELECT. I see 3 different displays that you want: a. SUBID,t1.ID,t1.FILE,t1.DATE,t1.DISCIPLINE,t2.NAME,t2.SUBID b. t3.DISCIPLINE,t3.NAME,t3.EMAIL c. table2.NAME,table3.NAME, table3.EMAIL Which do you want? -Original Message---

  1   2   >