Re: Date caculation is a select query

2002-12-03 Thread Bruce MacDonald
Chris, >would someone mind giving me a example query >where I would add 21 days to a datetime field Mysql, query mysql> create table member ( -> dt datetime ); Query OK, 0 rows affected (0.09 sec) mysql> insert into member values ('1991-06-22 14:00:00'); Query OK, 1 row affected (0.05 sec)

Re: Date caculation is a select query

2002-12-03 Thread Paul DuBois
At 11:03 +1100 12/4/02, Chris Kay wrote: How would I go about grabbing all records where a field is older than 21 days and set to a certain status. Dunno what you mean by "set to a certain status", but the other part will be: WHERE datetime_field < DATE_SUB(NOW(),INTERVAL 21 DAY) I tried INT

Delete from sub select

2002-12-03 Thread Kittiphum
Hi. This query can find the record in Table1 that not found in Table2 SELECT Table1.ID FROM Table1 LEFT JOIN Table2 Using(ID) WHERE Table2.ID IS NULL and what query that use to delete the record in Table1 that not found in Table2 such as Delete from Table1 where Table1.ID in SELECT Table1.I

Re: RES: SQL Select Idea

2002-12-03 Thread Michael T. Babcock
On Tue, Dec 03, 2002 at 07:02:02PM -0200, Felipe Moreno - MAILING LISTS wrote: > 2) What I get is I use the SELECT * FROM processo_arquivos ORDER BY DATE > DESC LIMIT 0,3 (considering that I only want 3) [ that worked as described ] > 3) The problem getting the result like this: > > Since I have

Re: Select, mysql_fetch_array, PHP question

2002-12-03 Thread Beauford.2003
Alex, That's it - I have a if (mysql_fetch_row($result)) before the while loop. I've changed it slightly and now it works fine. The little things are always the ones that get you. Thanks - Original Message - From: "Alex Pukinskis" <[EMAIL PROTECTED]> To: "Beauford.2003" <[EMAIL PROTEC

RE: relational is relational is relational, but ...

2002-12-03 Thread Adolfo Bello
MySQL supports using InnoDB tables. CREATE TABLE customers ( num INT PRIMARY KEY, Name VARCHAR(50) NOT NULL); CREATE TABLE sales( Product VARCHAR(15) NOT NULL, Price DOUBLE NOT NULL, Cust INT NOT NULL, # PRIMARY KEY definition goes here, INDEX (Cust), FOREIGN KEY(Cust) REFERENCES customers(num) O

RE: relational is relational is relational, but ...

2002-12-03 Thread Jon Frisby
What you're asking for is the ON CHANGE CASCADE behavior of FOREIGN KEYs, and I don't know if InnoDB supports this. However, from a DB design standpoint, it is generally considered MASSIVELY unwise for your PRIMARY KEY value to have any "business-meaning". If it has no "business-meaning", it neve

Re: Problems changing password following installation

2002-12-03 Thread Bhavin Vyas
I am not sure where it my reside but a 'find' for mysqladmin might yeild something. Bhavin. - Original Message - From: "Ken Morley" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 03, 2002 4:21 PM Subject: Problems changing password following installation > I download

Re: mysql.sock error

2002-12-03 Thread Bhavin Vyas
ps -wef | grep mysqld should show if the daemon is actually running or not. Check to make sure. Then, ls /tmp/mysql.sock will show you if the mysql file was created or not. Bhavin. - Original Message - From: "Jeff Hollingshead" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, Dec

RE: mysql.sock error

2002-12-03 Thread Adolfo Bello
Check if mysql is started by entering ps -ax | grep -i mysql If not started try: service mysql start Adolfo > -Original Message- > From: Jeff Hollingshead [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, December 03, 2002 5:17 PM > To: [EMAIL PROTECTED] > Subject: mysql.sock error > > >

Re: Problem doing Select * from table

2002-12-03 Thread Bhavin Vyas
The indexes are probably corrupt, you will need to run 'myisamchk' on the table. - Original Message - From: "Jason Hall" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 03, 2002 3:04 PM Subject: Problem doing Select * from table > I am using mysql 3.23.41 > The tables

Re: MySQL: Select HELP!

2002-12-03 Thread Alex Pukinskis
Try this: SELECT DATE, COD FROM processo_arquivos ORDER BY DATE DESC LIMIT 10 Unfortunately, that puts them in reverse order. There's probably a better way, with a more sophisticated use of the LIMIT keyword, that puts them in the right order. -Alex On Tuesday, December 3, 2002, at 10:41 AM

RE: SQL Select Idea

2002-12-03 Thread Jim Esten
Is anyone else experiencing long delays in posts? I sent this about 5 hours before it posted. Thanks, Jim -Original Message- From: Jim Esten [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 03, 2002 1:40 PM To: 'Felipe Moreno - MAILING LISTS'; [EMAIL PROTECTED] Subject: RE: SQL Selec

UPDATE

2002-12-03 Thread Cesar Aracena
Hi all, I'm using MyCC to make changes to a remote DB, but I found a problem while trying to update a record... does anyone knows what's wrong with this? UPDATE maraadmins SET adminpassword = password("1234") WHERE adminid = 3 Thanks in advance, Cesar L. Aracena [EMAIL PROTECTED] [EMAIL PROTECT

Date caculation is a select query

2002-12-03 Thread Chris Kay
How would I go about grabbing all records where a field is older than 21 days and set to a certain status. I tried INTERVIAL 21 Day but I cant seem to get it to work Field in the database is datetime Am I doing something wrong? Or is there a easier way to do this, would someone mind giving me a

RE: Newbie Question

2002-12-03 Thread Adolfo Bello
Php is widely used for web development, and works nicely with MySQL. Fuerthermore, it is supported by most hosting services. I recommend you to give it a try Adolfo > -Original Message- > From: Colaluca, Brian [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, December 03, 2002 2:25 PM > To:

Re: Newbie Question

2002-12-03 Thread David T-G
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brian -- ...and then Colaluca, Brian said... % % Hello there. Hi! % % I recently got a wild hair to set up an amateur web site that will allow a Heh :-) ... % category of wines ("It sucked"), and a user listing. I found that MySQL % fits perf

Re: Virtual Mem. problem w/ mysql-3.23.53-win.zip

2002-12-03 Thread DL Neil
Thanks for the quick response. Excellent support =you must have some 'magic touch'! =a bunch of us held a conversation on the list trying to run this fault down, and culminating in a bug report. We weren't even acknowledged... Quite dispiriting. Obvious suggested work-around was to get hold

Re: Select, mysql_fetch_array, PHP question (sorry - typo in my original email)

2002-12-03 Thread Beauford.2003
Sorry, where it says echo $item should have read echo $line['item']; Simply a typo, but the problem is still the same. Hi, I'm trying to do a search on database through a web interface using PHP and having one small problem. Example: If I search for items that cost $5.00 and there are three of th

Script works under 3.23.53a, doesn't under 4.0.5

2002-12-03 Thread Adolfo Bello
I have used a database creation script for months under 3.23.53a. Now, I want to upgrade to version 4.0.5 and the script doesn't work. The first table is created but mysql complains with: Error 1005 at line 10 Can't create table ./dbdir/tblbasestados.frm (errno:150) CREATE TABLE tblbasregiones(

Re: Newbie Question

2002-12-03 Thread Peter Brawley
Java has all the advantages of object orientation, and some of the disadvantages (prolix, nontrivial learning curve, &c). Plus it's not simple to set up & maintain. By comparison with Java, PHP is dead simple. Based on what you've written so far, I'd say PHP+MySQL would be a good fit. And there are

RE: CREATE TABLE and CHECK clausole

2002-12-03 Thread Victor Pendleton
You are correct. The 'CHECK` clause does not do anything. The syntax is provided only for compatibility and to aid in porting code from other DBMSs. -Original Message- From: Jon Frisby [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 03, 2002 12:43 PM To: 'MySQL Mailinglist' Subject: RE:

RE: Newbie Question

2002-12-03 Thread John Meyer
Brian, You can go either way (PHP, Perl, or JSP) for querying the database. My personal preference is PHP. What is a lot more important, however, is to do some serious database analysis and design. From a guy who's working with a database wtih only one field for address where there need to be fiv

Re: Newbie Question

2002-12-03 Thread Brendan Mansell
I've only recently started using mysql so i have first-hand newbie experience so i thought i was a good person to respond. i'm using php to query the database from my website. there's lots of good tutorials around for php, and its quite easy to pick up, easy to stick in your html (or should that

Re: REPLACE fails to find newlines

2002-12-03 Thread Keith C. Ivey
On 3 Dec 2002, at 6:29, Kenneth Porter wrote: > I figured this SQL should remove the extraneous breaks: > > UPDATE `bb1_posts` SET message = REPLACE(message,'\n','\n') WHERE 1; My first guess is that you have CRLF where you think you've got just LF. Have you tried the query with '\r\n' in plac

RE: MySQL: Select HELP!

2002-12-03 Thread Adolfo Bello
SELECT * FROM processo_arquivos ORDER BY DATE DESC LIMIT 0,10 > -Original Message- > From: Felipe Moreno - MAILING LISTS [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, December 03, 2002 1:42 PM > To: [EMAIL PROTECTED] > Subject: MySQL: Select HELP! > Importance: High > > > Hi List Users,

updated mysql "load data local..."

2002-12-03 Thread Sarah Killcoyne
We updated mysql yesterday to 3.23max and have just discovered that "load data local infile ." no longer works unless you enable it somewhere specifically. I've tried starting mysql with the option -local-infile=1 in several different files and on the command line. I can make it work with a f

Re: C API problems with InnoDB

2002-12-03 Thread Heikki Tuuri
Heri, - Original Message - From: ""H. Steuer"" <[EMAIL PROTECTED]> Newsgroups: mailing.database.mysql Sent: Tuesday, December 03, 2002 11:49 AM Subject: Re: C API problems with InnoDB > Hello Mark, > > thanks for your answer. In fact the mysql shell where I update the row is > using AUTO

Re: Perl DBI or C++ API Help!

2002-12-03 Thread Bernd Prager
- Original Message - From: "Sarah Killcoyne" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 03, 2002 11:14 AM > I need to be able to connect to mysql through a perl or C++ script without > knowing the name of the database to connect to. ,,, I'm not an expert om the

Re: truncate table ...

2002-12-03 Thread Heikki Tuuri
Sekhar, - Original Message - From: ""Sekhar.Thota"" <[EMAIL PROTECTED]> Newsgroups: mailing.database.mysql Sent: Tuesday, December 03, 2002 3:14 PM Subject: truncate table ... > Dear All, > > I am getting a severe problem with truncate comand( InnoDB Tables > - > Mysql 3.23.52-MAX on

Re: Time&Date in SQLServer7

2002-12-03 Thread gerald_clark
That is not the proper format for a date/time field. It should be CCYYMMDDHHMMSS as a number or 'CCYY/MM/DD HH:MM:SS' as a string. You may not use any other format for an insert/update. [EMAIL PROTECTED] wrote: Hi I am inserting a Time like 06:00 from my code to a Date/Time field in SQLServer7.

relational is relational is relational, but ...

2002-12-03 Thread David T-G
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi again, all -- I apologize in advance for asking kindergarten-level questions on the list, but my head is getting really bruised from this one. I'm trying to understand what makes a relational (not necessarily transactional) database and how, in wh

Problems changing password following installation

2002-12-03 Thread Ken Morley
I downloaded MySQL 3.23 for my Linux server and installed it using rpm -Uvh *.rpm. The installation went OK and at the end, I was given a "Don't set the root password reminder". Specifically, it tells you to set the password using two commands: /usr/bin/mysqladmin -u root password 'new-password'

mysql.sock error

2002-12-03 Thread Jeff Hollingshead
at first when trying to run mysql it did this: [root@shadow mysql]# bin/safe_mysqld --user=mysql & [1] 3124 [root@shadow mysql]# Starting mysqld daemon with databases from /var/lib/mysql 021121 02:27:42 mysqld ended [1]+ Donebin/safe_mysqld --user=mysql then, i stopped mys

Re: DateTime Calculations

2002-12-03 Thread Jeff Kilbride
Try this: select sec_to_time(unix_timestamp(column_two) - unix_timestamp(column_one)) Should give you the elapsed time in hh:mm:ss format. --jeff - Original Message - From: "Peter Abilla" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 03, 2002 8:45 AM Subject: DateT

replication problem

2002-12-03 Thread Gil Shai
Hi I am using replication with MyISAM tables with MySQL. I want to check once in a while that the master and slave are synchronized through software. Is there an elegant way of doing it except for using SHOW MASTER STATUS with the file name and pointer? Thanks Gil Shai Savantis Systems   --

RE: Trying2insert Date2table

2002-12-03 Thread Adolfo Bello
Missing quotes. It should read: sNewCallBackSQLINSERT INTO CallBacks (LearnerID,CallDate,CallTime) VALUES (2113 , '01/01/2002' , '0:00') > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, December 03, 2002 9:41 AM > To: [EMAIL PROTECTED]; [EMAIL P

Re: DateTime Calculations

2002-12-03 Thread Pablo
On 12/3/02 10:45 AM, Peter Abilla ([EMAIL PROTECTED]) wrote: > Suppose I have a datetime in the following format: > > Column One Column Two > 1999-09-17 16:30:18 1999-09-18 13:30:18 > > I want to calculate the minutes like > > (Column Two - Column One) = Total Minutes > > I've

RE: MySQL: Select Not In Table

2002-12-03 Thread Adolfo Bello
SELECT Table1.ID FROM Table1 LEFT OUTER JOIN Table2 ON Table1.ID=Table2.ID WHERE Table2.ID IS NULL; > -Original Message- > From: Henning Sittler [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, December 03, 2002 10:16 AM > To: 'mysql users' > Subject: MySQL: Select Not In Table > > > Just w

RES: SQL Select Idea

2002-12-03 Thread Felipe Moreno - MAILING LISTS
Hi Jim and others that tried to help me! Thanks for any kind os answer. Well, the SQL command that you suggested don't work for me. Below, I will show What I want and what I get if I use the select command you suggested: 1) What I have: Table: processo_arquivos _ |Co

Re: Time&Date in SQLServer7

2002-12-03 Thread DL Neil
Sam, heads up! MySQL list members don't want this = spam! =dn - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, December 03, 2002 4:54 PM Subject: Time&Date in SQLServer7 > Hi > > I am inserting a Time like 06:00 from my code to a

RE: join count and 0

2002-12-03 Thread Adolfo Bello
select oi.id,oi.name, count(o.id) from orderid oi LEFT OUTER JOIN orders o ON o.order_id = oi.id group by oi.id,oi.name ; > -Original Message- > From: Charles Verge [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, December 03, 2002 11:53 AM > To: [EMAIL PROTECTED] > Subject: join count and 0

re: change the data directory

2002-12-03 Thread Julia Simmons
> Julia, > Tuesday, December 03, 2002, 2:24:49 AM, you wrote: > > JS> I have just installed the mysql binary on solaris 8. > JS> I would like have the data go to a different directory than /local/mysql/data. > JS> How do I get it to do that? > > JS> I tried starting it with the --datadir set, but

Re: Advice please

2002-12-03 Thread Jan Steinman
>From: "George Pitcher" <[EMAIL PROTECTED]> > >I am about to start the planning process in moving my FileMaker/Lasso/PHP >site over to MySQL/PHP. > >Before I get too far down the road, should I be using InnoDB or MyISAM >tables? InnoDB does not support FULLTEXT indeces. Since FileMaker searches ar

Re: DateTime Calculations

2002-12-03 Thread Steve Yates
On Tue, 03 Dec 2002 10:45:57 -0600, Peter Abilla wrote: >(Column Two - Column One) = Total Minutes Assuming this doesn't work :) perhaps select UNIX_TIMESTAMP(col2) - UNIX_TIMESTAMP(col1) as TimeDiff This should give you an answer in seconds. [sql] - Steve Yates - File not found. S

Re: Select, mysql_fetch_array, PHP question

2002-12-03 Thread Steve Yates
On Tue, 3 Dec 2002 08:38:59 -0500, Beauford.2003 wrote: > while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { > echo $item; } Try echo $line['item']; - Steve Yates - Any sufficiently advanced magic looks like technology. ~ Taglines by Taglinator - www.srtware.com ~ --

Re: help with picking the right index(s)

2002-12-03 Thread Steve Yates
On Tue, 03 Dec 2002 12:47:28 +1100, Justin French wrote: >my php script looks for a row matching this year (2002), this >month (12) and this page (something.php) It would seem like one index on year/month/page would be appropriate then. It could be used for both lookups and for reporting

Re: Blob accepts LongBlob without error

2002-12-03 Thread Jan Steinman
>From: "Ryan @ Common Ground . To" <[EMAIL PROTECTED]> > >It seems that MySQL accepts insertion of a string into a BLOB field that is longer >than the maximum length of the BLOB data-type and it will still accept it. > >Perhaps MySQL should output an error or at least a warning to know the string

Re: DateTime Calculations

2002-12-03 Thread Cory Hicks
Peter, I would do something like this: (UNIX_TIMESTAMP(Column Two) - UNIX_TIMESTAMP(Column One))/3600 to give you the hoursnot sure about the minutes, but this should get you going! HTH, Cory '$valid_user' "; On Tue, 2002-12-03 at 10:45, Peter Abilla wrote: > Suppose I h

Re: DateTime Calculations

2002-12-03 Thread Rodney Broom
From: Peter Abilla <[EMAIL PROTECTED]> > (Column Two - Column One) = Total Minutes This is quite a hack, and there's probably a better way. But it works: SELECT ROUND( (unix_timestamp(column_one) - unix_timestamp(column_two)) /60 ) as my_minutes; > I've scoured the mysql site and haven't f

Problem doing Select * from table

2002-12-03 Thread Jason Hall
I am using mysql 3.23.41 The tables are set to MyISAM. Table "A" i having problem with has 1.4 million records. When i perform a mysqldump it hangs on this table but dumps other tables. Also when i do a select * from table it hangs. But if i do select count(*) from table a get a result. The fiel

RE: Select, mysql_fetch_array, PHP question

2002-12-03 Thread Jennifer Goodie
$item is probably undefined, unless you are assigning it a value somewhere else in your script. mysql_fetch_array is putting the result set in an associative array called $line, so $line['item'] would hold the result from your query. -Original Message- From: Beauford.2003 [mailto:[EMAIL

RE: SQL Select Idea

2002-12-03 Thread Jim Esten
Something on the order of... SELECT * FROM processo_arquivos ORDER BY DATE DESC LIMIT 0,10 Seems like that ought to do it.. Jim Jim Esten Chief Techbot WebDynamic http://www.wdynamic.com -Original Message- From: Felipe Moreno - MAILING LISTS [mailto:[EMAIL PROTECTED]] Sent: Tuesday,

RE: SQL Select Idea

2002-12-03 Thread Mike Hillyer
I believe that SELECT * FROM processo_arquivos ORDER BY date DESC LIMIT 10; Should do it. Mike Hillyer -Original Message- From: Felipe Moreno - MAILING LISTS [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 03, 2002 9:39 AM To: [EMAIL PROTECTED] Subject: SQL Select Idea Importance: H

RE: join count and 0

2002-12-03 Thread Luc Foisy
> I am wanting to see if there is a way to do a join but > have count(id) show up as 0 when there is no records in > the 2nd table. With out having to 2 selects. > > for example. > > orderid = has persons name and contact info > > > select oi.id,oi.name, count(o.id) from orderid oi, orders o

RE: Perl DBI or C++ API Help!

2002-12-03 Thread Salada, Duncan
For Perl... Take a look at the data_sources DBI class method http://search.cpan.org/author/TIMB/DBI-1.32/DBI.pm#DBI_Class_Methods or the ListDBs MetaData Method for DBD::mysql http://search.cpan.org/author/JWIED/DBD-mysql-2.1020/lib/DBD/mysql.pod#Priva te_MetaData_Methods Duncan

4.0.5 mysqld-max segs on TCP connect under RH 8.0

2002-12-03 Thread bailey
>Description: Test mysql 4.0.5 beta installed from binary RPMs: MySQL-4.0.5-0, MySQL-shared-4.0.5-0, MySQL-devel-4.0.5-0, MySQL-client-4.0.5-0, MySQL-Max-4.0.5-0 mysqld-max starts normally (including binding TCP socket) and handles connections via Unix socket normally, but segs

Re: Selective Replication question

2002-12-03 Thread John Stanforth
Ok, so nevermind... MySQL actually supports the selective replication I want with the replicate-do-table=db_name.table_name syntax, which I thought was only available after 4.x. Thanks for all the great responses that helped me figure this out. :-) =john John Stanforth wrote: Hi folks,

mysql@lists.mysql.com

2002-12-03 Thread Charlie Root
>Description: >How-To-Repeat: >Fix: >Submitter-Id: >Originator:Charlie & >Organization: >MySQL support: [none | licence | email support | extended email support ] >Synopsis: >Severity: >Priority: >Category: mysql >Class: >Release:

RE: Virtual Mem. problem w/ mysql-3.23.53-win.zip

2002-12-03 Thread Patrick Quinnett
Thanks for the quick response. Excellent support We will be using myCC next until we see the next release of mySQL. -Original Message- From: miguel solórzano [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 03, 2002 12:26 PM To: Patrick Quinnett; '[EMAIL PROTECTED]' Subject: Re: Vi

RE: CREATE TABLE and CHECK clausole

2002-12-03 Thread Jon Frisby
I've attempted to get the CHECK clause to work as well, and have had no luck. I don't think it's actually supported by MySQL yet. -JF > -Original Message- > From: R. Hannes Niedner [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, December 03, 2002 7:42 AM > To: Achille M. Luongo; MySQL Maili

Re: Virtual Mem. problem w/ mysql-3.23.53-win.zip

2002-12-03 Thread miguel solórzano
At 08:28 03/12/2002 -0600, Patrick Quinnett wrote: Yes, When the service is running ( mysqld-nt or mysqld-opt ), my Windows 2000 virtual memory gets eaten up and I get messages that I have run out and need to reboot. Once I shutdown the service, I go back to normal. I use mySQLWinAdmin to do al

Newbie Question

2002-12-03 Thread Colaluca, Brian
Hello there. I recently got a wild hair to set up an amateur web site that will allow a group of friends to log and comment on bottles of wine. Having never done web development before, I set out to first research what relational database I would use that would satisfy my need for maintaining thr

RE: Select and count duplicates

2002-12-03 Thread Victor Pendleton
select distinct(headlines), count(headlines) from table group by headlines -Original Message- From: David Shapiro [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 03, 2002 8:40 AM To: 'Michelle de Beer'; mysql list Subject: RE: Select and count duplicates Run this query as rs1: sele

MySQL: Select HELP!

2002-12-03 Thread Felipe Moreno - MAILING LISTS
Hi List Users, I want to know if anyone has any idea on how can I do the SQL command below to archive a result. I have one table called processo_arquivos that have a filed called DATE and another FIELD called COD (primary key). I want to select the last TEN (10) dates from the Database, but

Re: REPLACE fails to find newlines

2002-12-03 Thread gerald_clark
Since '\n' is ignored in HTML, that is not your problem. The answer is probably in your PHP setup or code. Kenneth Porter wrote: Using Red Hat 8.0, mysql-3.23.52-3, and phpMyAdmin-2.3.3. I'm importing a bunch of old posts from one bboard system (Ezboards) into a new one (Burning Board), and the

Re: sleeping threads problem

2002-12-03 Thread Dan Nelson
In the last episode (Dec 03), cristian ditoiu said: > Hello , i use MySql 3.23.49-log with Php 4.2.1on RH 7.2 . > The problem is that i got many many (16-30) sleeping threads almost all the > time . The code is pretty clean , and i suspect > that those threads are sleaping beacuse of some strange

Index timestamp column

2002-12-03 Thread Michal Franc
Its possible to use index on this query ?? select .. from .. where timestamp_col<2002110100 and timestamp_col>2001110100 I have index on timestamp column, but EXPLAIN says that not using any of possible keys. I also try using BETWEEN function instead of two compares, but same result

RE: MySQL: Select Not In Table

2002-12-03 Thread Henning Sittler
Thanks to all those who have responded! This is the sql query I am looking for. It's good to have such a user mail list. SELECT Table1.ID FROM Table1 LEFT JOIN Table2 Using(ID) WHERE Table2.ID IS NULL when you do a left join, if there is no cooresponding row in the second table, then a row

Re: Security issues with LOAD DATA

2002-12-03 Thread cwilli14
This also does not enable me to upload a data file. My resulting SQL statement reads: LOAD DATA LOCAL '/tmp/phpgPhl51' INTO TABLE test FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\r\n' I have also tried: LOAD DATA LOCAL INFILE '/tmp/phpgPhl51' INTO TABLE test FIE

Re: MySQL: Select Not In Table

2002-12-03 Thread gerald_clark
SELECT Table1.ID FROM Table1 LEFT JOIN Table2 ON Table1.ID = TRable2.ID where Table2.ID IS NULL; Henning Sittler wrote: Just wondering if anyone knows of a work around for selecting rows in Table1 that have an ID column value which is not found in the ID column of Table2. I have seen a workarou

Re: MySQL: Select Not In Table

2002-12-03 Thread Listen Hinz
Dear Henning, > SELECT Table1.ID FROM Table1 WHERE Table1.ID NOT IN (SELECT Table2.ID FROM > Table2); SELECT Table1.ID FROM Table1 LEFT JOIN Table2 USING (ID) WHERE Table2.ID IS NULL Hope it helps, -- Stefan Hinz <[EMAIL PROTECTED]> Geschäftsführer / CEO iConnect GmbH

Time&Date in SQLServer7

2002-12-03 Thread Sam4Software
Hi I am inserting a Time like 06:00 from my code to a Date/Time field in SQLServer7...the value I am sending in my program is perfectly finebut...when It gets in the database... it gets screwed up to be like 01/01/1900 06:00:00 What I need really is only the time rather than Date/Time. Any

Re: LEGAL information about MySQL.

2002-12-03 Thread Michael T. Babcock
On Mon, Dec 02, 2002 at 08:52:53PM +0100, Mark wrote: > Is this true? If so, that is a relief. But does the licence also not talk > about "using" MySQL? Is connecting to MySQL not the same as "using" it? First off, the GPL is very clear that it is not a mandatory license. Your options are to eit

order by clause with latin5 character set on binary fields

2002-12-03 Thread Veysel Harun Sahin
Hello, I use mySQL 3.23.49 with latin5 character set. At some of my tables I use binary fields. At normal fields order by clause returns true sorting but at binary fields I get wrong results. Is there any way to correct this problem or have to I use normal fields instead of binary and use "BIN

DateTime Calculations

2002-12-03 Thread Peter Abilla
Suppose I have a datetime in the following format: Column One Column Two 1999-09-17 16:30:18 1999-09-18 13:30:18 I want to calculate the minutes like (Column Two - Column One) = Total Minutes I've scoured the mysql site and haven't found something that addresses this. Any ideas

Re: Table setup question

2002-12-03 Thread Beauford.2003
DL, Yep, I see what your saying. In my application it may work fine, but in larger applications where things may change, it would be easier to do it with the 3 tables. Thanks - Original Message - From: "DL Neil" <[EMAIL PROTECTED]> To: "Beauford.2003" <[EMAIL PROTECTED]>; <[EMAIL PROTECT

Select, mysql_fetch_array, PHP question

2002-12-03 Thread Beauford.2003
Hi, I'm trying to do a search on database through a web interface using PHP and having one small problem. Example: If I search for items that cost $5.00 and there are three of them, the query works and displays the information, but if there is only one item the query works but doesn't display the

SQL Select Idea

2002-12-03 Thread Felipe Moreno - MAILING LISTS
Hi List Users, I want to know if anyone has any idea on how can I do the SQL command below to archive a result. I have one table called processo_arquivos that have a filed called DATE and another FIELD called COD (primary key). I want to select the last TEN (10) dates from the Database, but

Re: JDBC driver: Buggy for DatabaseMetaData.getImported/Exportedkeys ?

2002-12-03 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 j.random.programmer wrote: Hi: I am using Connector/J 3.0.2 against MySQL 3.23.52-max. My default table type is set to InnoDB (since I always use innodb). The following methods are acting strangely: - DatabaseMetaData.getImportedKeys() - Database

Perl DBI or C++ API Help!

2002-12-03 Thread Sarah Killcoyne
I need to be able to connect to mysql through a perl or C++ script without knowing the name of the database to connect to. I can't seem to find a way to do this. Is it possible to either: look up database names so I can pick one before connecting or connect without a database name so I can "show

join count and 0

2002-12-03 Thread Charles Verge
I am wanting to see if there is a way to do a join but have count(id) show up as 0 when there is no records in the 2nd table. With out having to 2 selects. for example. orderid = has persons name and contact info select oi.id,oi.name, count(o.id) from orderid oi, orders o where o.order_id = oi

Re: Syntax error in INSERT

2002-12-03 Thread Achille M. Luongo
Hi, I suppose you have to use a NULL value: INSERT INTO CallBacks (LearnerID,CallDate,CallTime) VALUES (2113,NULL,NULL)I [EMAIL PROTECTED] wrote: > > Hi, > I have the following statement causing an error near "," > sNewCallBackSQL = "INSERT INTO CallBacks (LearnerID,CallDate,CallTime) V

RE: dividing

2002-12-03 Thread Fifield, Mike
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 03, 2002 8:35 AM To: Fifield, Mike Subject: Re: dividing Your message cannot be posted because it appears to be either spam or simply off topic to our filter. To bypass the filter you must inc

Re: CREATE TABLE and CHECK clausole

2002-12-03 Thread R. Hannes Niedner
On 12/3/02 4:32 AM, "Achille M. Luongo" <[EMAIL PROTECTED]> wrote: > Dear Sir, > > I have tried with FLOAT or DECIMAL data types, but MySQL always returns the > same error. After your suggestion, I double checked the MySQL data types > definition list and the INTEGER (alias INT) data type is supp

Re: Select and count duplicates

2002-12-03 Thread Roger Baklund
* Michelle de Beer > I have a column containing headlines. In this column > there are some duplicates, like this: > --- > monsters > headline1 > monsters > halloween > monsters > halloween > ... > -- > > How can I get a result like this instead? > HEADLINE | HITS > -

bug / feature : privilege inconsistency

2002-12-03 Thread Antoine
Hi, The new CREATE TEMPORARY privilege is a very good idea. Unfortunately, when an user creates a temporary table, he can't write to it if he doesn't also have the INSERT privilege. It would be much more useful if an user were always allowed to write to its own private temporary tables, regardles

Re: WHERE IN SYNTAX

2002-12-03 Thread Peter Abilla
My mistake. I failed to mention that there are two tables, bar and baz. And, I found the answer to my question. Thanks everybody. On 12/2/02 5:52 PM, "Adolfo Bello" <[EMAIL PROTECTED]> wrote: > Isn't this sort of impossible? > You are asking for something like "a set which contains as an elemen

RE: Select and count duplicates

2002-12-03 Thread David Shapiro
Run this query as rs1: select distinct scary_words from monsters_table; String word; String query; Int count; while rs1.next() { word = rs1.getString(); // Run this sql query as rs2 query = 'select count(*) from monster_table where scary_words="' + word + '"';

Re: ERROR 2014 - command out of sync, why?

2002-12-03 Thread Paul DuBois
At 12:16 +0100 12/3/02, Claus Reestrup wrote: Database error: cannot use database pollo MySQL Error: 2014 (Commands out of sync; You can't run this command now) Session halted. Why? What's the context? Are you, for example, seeing this error from within a PHP script? ---

Virtual Mem. problem w/ mysql-3.23.53-win.zip

2002-12-03 Thread Patrick Quinnett
When the service is running ( mysqld-nt or mysqld-opt ), my Windows 2000 virtual memory gets eaten up and I get messages that I have run out and need to reboot. Once I shutdown the service, I go back to normal. I use mySQLWinAdmin to do all the starting and stopping of the service. Any ideas ??

REPLACE fails to find newlines

2002-12-03 Thread Kenneth Porter
Using Red Hat 8.0, mysql-3.23.52-3, and phpMyAdmin-2.3.3. I'm importing a bunch of old posts from one bboard system (Ezboards) into a new one (Burning Board), and the process left a bunch of HTML "" on the end of each line that is now unwanted. (I'm getting double-spacing.) I figured this SQL sho

Re: C API problems with InnoDB

2002-12-03 Thread Dr. Frank Ullrich
Heri, "H. Steuer" schrieb: > > Hi Stefan, > > > Does the second shell actually perform those changes? In this case, I > assume > > it's got something to do with the isolation level / consistent read in > > InnoDB tables. "shell1" sees all its changes immediately, "shell2" (the > > application) h

MySQL: Select Not In Table

2002-12-03 Thread Henning Sittler
Just wondering if anyone knows of a work around for selecting rows in Table1 that have an ID column value which is not found in the ID column of Table2. I have seen a workaround for selecting similar rows IN both tables, but I want NOT IN. This would be a work around to the sql subselect query in

re: Select and count duplicates

2002-12-03 Thread Victoria Reznichenko
Michelle, Tuesday, December 03, 2002, 2:27:00 PM, you wrote: MdB> I have a column containing headlines. In this column MdB> there are some duplicates, like this: MdB> --- MdB> monsters MdB> headline1 MdB> monsters MdB> halloween MdB> monsters MdB> halloween MdB> ... MdB> -- MdB> H

re: CREATE TABLE and CHECK clausole

2002-12-03 Thread Egor Egorov
Achille, Tuesday, December 03, 2002, 11:08:19 AM, you wrote: AML> MySQL seems to support the CHECK() clausole in the implementation of CREATE AML> TABLE statement, but MySQL (Ver 11.15 Distrib 3.23.39, for pc-linux-gnu) AML> returns a syntax error on such a command. For example: AML> mysql> CREAT

re: Blob accepts LongBlob without error

2002-12-03 Thread Victoria Reznichenko
Ryan, Tuesday, December 03, 2002, 2:04:03 AM, you wrote: RCGT> I have successfully inserted and retrieved binary image files within RCGT> MySQL. No big deal. RCGT> However, for quite some time I was perplexed because only about half my RCGT> image was going through. RCGT> It seems that MySQL a

re: change the data directory

2002-12-03 Thread Egor Egorov
Julia, Tuesday, December 03, 2002, 2:24:49 AM, you wrote: JS> I have just installed the mysql binary on solaris 8. JS> I would like have the data go to a different directory than /local/mysql/data. JS> How do I get it to do that? JS> I tried starting it with the --datadir set, but that didn't wor

re: Problem with a table

2002-12-03 Thread Egor Egorov
Edgard, Tuesday, December 03, 2002, 1:45:15 PM, you wrote: ED> I'm new with mysql, and I have a problem in a dabase, the file sysmte got ED> full and one table is corrupt, the messages are: ED> mysql> desc medicionproc; ED> ERROR 1016: Can't open file: 'medicionproc.MYD'. (errno: 144) ED> I try

re: Users and their priveleges in a mySQL Database

2002-12-03 Thread Victoria Reznichenko
Andi, Tuesday, December 03, 2002, 8:52:33 AM, you wrote: ASG> Can mysql have different tables for different users ? Say user 'TEST1' ASG> creates a table called 'XYZ' and also user 'TEST2' creates the same table ASG> name 'XYZ' ASG> Is it allowed ? Yes. Table names must be unique within a databa

  1   2   >