sub-selects

2002-05-02 Thread Alex
i have to use a statement like: SELECT CODICE FROM TABSIC WHERE COM=1 AND SEN=1 AND PRI=1 AND CODICE<>ALL(SELECT CODICE_TABSIC FROM ARCHIVIO_SICU_MIN WHERE (CODICE_ARCHIVIO=342)) but mysql doesn't support inner select. What statement should i use instead of this one ? Thanks... Alex. ---

memcpy segfaults from store_record_in_cache under load on p4, 3.23.41 and .49

2002-05-02 Thread Jay Thorne
error log available on request. Ezmlm rejected it. Its always in memcpy+49 just before it gets to the pthread handler and the segfault handler. This is pretty consistent. I have a query that was 100% reliable, until the server went into production. Now its serving 15 queries/sec, and crashes pr

Re: Very Strange problem.

2002-05-02 Thread TP R Murthy
Hi, I do commit alright. This doesn't happen often. i insert into the tables from a java web app. The db and the data in it is fine when i stop and restart the web server(tomcat). sometimes when i restart the machine, data is all intact. I was using the mysql 4 max before. Same thing happene

Re: Very Strange problem.

2002-05-02 Thread Jeremy Zawodny
On Fri, May 03, 2002 at 11:04:29AM +0530, TP R Murthy wrote: > > I have created only one database with 18 tables. Only one of these tables > is MyIsam table. rest are BDB tables. When the server is up, it works > fine. but when i reboot the machine, few of the tables loose all the > records th

Very Strange problem.

2002-05-02 Thread TP R Murthy
Hi, I am new to this list. i could find solution to this problem on the net. i have a RH7.1 512Mb single intel processor. I have installed mysql-3.23.49a-max (binary). I have included the mysql.server script in the init dir and created links to it in rc6, rc5,rc3 and rc1 dir. I have create

MySQL Problem

2002-05-02 Thread Jagadeesh Suryadevara
Hello Sir/Madam, We want to use MYSQl as a back end for one of our projects. We download following 4 zip to install MySQL. mysql-4.0.0a-alpha-win-src.zip mysql-4.0.0a-alpha-win.zip mysql-4.0.1a-alpha-win-src.zip mysql-4.0.1a-alpha-win.zip After unzipping the file and MySQL is loaded successfull

Re: [OT] Reply to this lists goes to sender!!! ????

2002-05-02 Thread Benjamin Pflugmann
Hi. On Thu, May 02, 2002 at 02:42:44AM -0700, [EMAIL PROTECTED] wrote: > Ehm, is my mailer boofed, how come if I try to reply to a list > message, it is set to go to the sender not the list? It may be arguable, but the list is set up this way. > Am I on a weird sql list here? Depends. Personal

Re: How to query SET OPTION variables?

2002-05-02 Thread Benjamin Pflugmann
Hi. On Thu, May 02, 2002 at 12:02:44AM -0700, [EMAIL PROTECTED] wrote: > On Tue, Apr 30, 2002 at 04:17:00PM +0200, Benjamin Pflugmann wrote: > > Hi. > > > > Maybe I am blind, but I cannot find, how I can query the status of > > one of the variables I can set with SET OPTION. I.e. if I do > > >

Problem with FullTextSearch and PHP

2002-05-02 Thread root
Hello All, If i use full text search with Boolean mode i got the following error mysql> select * from articles where match (title,body) against('+Your -Trail' in boolean mode); ERROR 1064: You have an error in your SQL syntax near 'boolean mode)' at line 1 How can i over come this error. mys

Re: Fw: data compare and duplicate entries..

2002-05-02 Thread Dicky Wahyu Purnomo
On Thu, 2 May 2002 15:31:44 +0200 "Tech @NorthWeb" <[EMAIL PROTECTED]> wrote: > hi, > I was looking for an SQL statement or script that whould allow me to compare > data when it was entered into a mysql-php field on a web page so that it > checks whether the data entered has not been used before

Re: Problem with SELECT

2002-05-02 Thread Dicky Wahyu Purnomo
On Thu, 02 May 2002 13:11:23 +0400 "Sheni R. Meledath" <[EMAIL PROTECTED]> wrote: > Using the second command I can't display all the records. > > But using separate select statement I can select & display any record which > is not displayed in the above case. > ### > $result=mysql_query("selec

RE: How to Count(*) with LIMIT

2002-05-02 Thread mos
At 11:04 AM 5/2/2002, you wrote: >Hi Again... !! > > > It is used to set up the navigator bar buttons for the grid on the web >page > > (PHP) so it says "<< < Page 1 of 18 > >>" with buttons on either >side > > of it. > >I'm a bit confused now... >You are building a "pager" to a webpage, rig

Structure of Mysql Error Messages

2002-05-02 Thread Tim Johnson
Hello All: I am using mysql Ver 11.15 Distrib 3.23.41, for redhat-linux-gnu (i386) on RH 7.2 So far, I am getting the following impression: Mysql error messages can be delimited into 3 sections: delimited by 2 colons. 1)Error code example-> ERROR 1045

Re: transactions

2002-05-02 Thread John Noronha
Dear all, The message I enclose is dated almost a year back. I would greately appreciate if you let me know if transaction support in MySQL has stabilised in sub-sequent releases ? secondly, if one does use transactions by converting to BDB of InnoDB what is the impact on indexing/ speed of acces

Re: How to strip off email domain for sorting by domain?

2002-05-02 Thread Arjen Lentz
Hi, On Fri, 2002-05-03 at 02:43, Andrew Kuebler wrote: > I use Perl/DBI with MySQL and I'm trying to find a way to sort email > addresses by domain. I would assume there is probably an option in MySQL > to strip off the text after the '@' sign that will allow me to sort on. > > In Perl: > > @fi

Strategies for maintaining tables calculated from other tables?

2002-05-02 Thread Nick Arnett
I'm finding that it's not quite as simple as I had imagined to maintain a table whose values are calculated by analyzing other tables. The source tables contain time series data, which can is updated several times a day. To calculate totals by day, week, month, etc., I don't want to have to start

self-join in MySQL tables

2002-05-02 Thread Scott Haneda
How does one create a self-join in MySQL tables? I've only played a little with SQL selects so far, some inner joins, and now I have to create a many-to-many relationship between records in the same table. So, I have a links table with the local key and the foreign key, that will link record A to

New MySQL releases: when?

2002-05-02 Thread Jerry van Leeuwen
I haven't been keeping up with this list much, but for the past months I have been religiously checking the MySQL web-site for new MySQL 4 releases... has something happened to stagnate progress? ... some of the pages mention that releases should have happened Q4 2001... It might be nice if s

Re: Mandatory Fields

2002-05-02 Thread Benjamin Pflugmann
Hi. On Thu, May 02, 2002 at 08:13:26AM +0200, [EMAIL PROTECTED] wrote: > No i don't mean that, i mean a field that the user can assign a value to > it or not (optional) or a field that the user must set a value for it > (Mandatory) . That is exactly what I understood you want. Either I misunde

Should i repair?

2002-05-02 Thread Edilson Vasconcelos de Melo Junior
Hi, I have a table that has now about 10 records (about 100bytes each one). My queries were too slow and some time a lost connection. But now i can't do anything with this table :( Even "SELECT * FROM mytable LIMIT 1" doesn't return a value... Is my table crashed? What should i do now

Re: inserting into the lowest possible id

2002-05-02 Thread Dan Nelson
In the last episode (May 02), daniel said: > lets say you have a table like this > > id | data0 | data1 | ... > 0| x | y | ... > 1| x | y | ... > 2| x | y | ... > 3| x | y | ... > 4| x

inserting into the lowest possible id

2002-05-02 Thread daniel
lets say you have a table like this id | data0 | data1 | ... 0| x | y | ... 1| x | y | ... 2| x | y | ... 3| x | y | ... 4| x | y | ... 7| x | y | ... w

Re: Killing a Thread

2002-05-02 Thread Jeremy Zawodny
On Mon, Apr 29, 2002 at 10:23:25PM -0500, Dave Losen wrote: > Greetings, > > I'm new to the list and apologize if this question has already been > answered. > > I'm trying to figure out how to make a thread die. From the > processlist command of mysqladmin I get back a listing of > unauthent

FW: How to upgrade MySql?

2002-05-02 Thread Hong Tian
> Hi, > > We have a Web server with Apache 1.3.22+MySql 3.23.44+php 4.0.6 > on Solaris 8. Now we want to upgrade MySql to latest version. > > Should I re-compile both Apache, MySql, and PHP or just re-compile > MySql? The question is how to upgrade MySql on Apache server with > multi-applicatio

Re: Good color coded SQL editor for MySQL?

2002-05-02 Thread Stewart Douglas
> Hmm. I've been using the genreic sql-mode that comes with GNU Emacs, > and it works well. What (if anything) about sql-mode do you have in > your .emacs file (or the windows eqivelant)? > > Jeremy > -- > Jeremy D. Zawodny, <[EMAIL PROTECTED]> Jeremy The only entries I have in my .emacs fi

RE: Re:  RE: confirm subscribe to mysql@lists.mysql.com

2002-05-02 Thread nandagopalnair
[EMAIL PROTECTED] wrote: >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 include >one of the following words in your message: > >sql,query > >If you just reply to this message, and include the entire text of it

How to upgrade MySql?

2002-05-02 Thread Hong Tian
Hi, We have a Web server with Apache 1.3.22+MySql 3.23.44+php 4.0.6 on Solaris 8. Now we want to upgrade MySql to latest version. Should I re-compile both Apache, MySql, and PHP or just re-compile MySql? The question is how to upgrade MySql on Apache server with multi-application? TIA -

ID - sort problem

2002-05-02 Thread savaidis
I have one table on my computer and one remote to my host on Internet. I have this problem: I use => ALTER TABLE hotels1 DROP ID; ALTER TABLE hotels1 AUTO_INCREMENT=1, ADD ID int unsigned not null auto_increment default '0' first, ADD primary key (ID); to refresh the ID starting f

Re: Re: Re: ensuring that I'm getting the correct "last insert ID"

2002-05-02 Thread Jonnycattt
Gotcha. So far, selecting the last_insert_id() is working. I'll see what the CF forums have to say. thanks. --- Original Message From: "Jeff Kilbride" To: "Jonnycattt" CC: Subject: Re: Re: ensuring that I'm getting the correct "last insert ID" Date: 02/05/02 I don't have any experi

Re: User Variables and Previous Row Question

2002-05-02 Thread Jasmin Bertovic
This makes sence, now that I have had some time to think about it. If I self join, I have to make sure that my data is continuous to shift all the rows by 1. Some of the things could have missing dates or maybe I could self join on an incremental counter using a tmp table. I have do go back to

RE: backslash about MySQL++/Microsoft Visual C++ 6.0 (2)

2002-05-02 Thread Richard Morton
Hi, I have had a similar problem... This also occurs with ' or ". in any field you expect this character use: REPLACE("c:\mysql\test","\","/") Returns the string str with all all occurrences of the string from_str replaced by the string to_str: mysql> select REPLACE('www.mysql.com', 'w', 'Ww')

Re: Re: GUI managers for Linux

2002-05-02 Thread Rance Hall
Victoria, You asked me to be sure that the information going into the MyCC dialog box about the server was correct, and it is, port, user, password, and host, but still no connect, php can even connect to the database with the server/user/password triple. so back to my original question, why

Re: User Variables and Previous Row Question

2002-05-02 Thread Alexander Keremidarski
Hi, Jasmin Bertovic wrote: >For example; > >SELECT number as current_day, (number - ) >as change_from_prev_day FROM TABLE ORDER BY DATE > > is the reference that I need from the >previous row. > >Am I missing something simple or do I have to do this >outside of MYSQL? > > 1. Yes you are missing

Re: FullText Search 3.23.49-nt

2002-05-02 Thread Jeff Kilbride
Fulltext search is based on relevance. If the words you're searching for appear in over 50% of the rows, MySQL assumes they aren't relevant because they occur too often. Try inserting more rows with different info in the fields that have the fulltext index -- then try your search again. --jeff -

RE: FullText Search 3.23.49-nt

2002-05-02 Thread Christopher Book
> Try not using the word 'text' as your column name. Using reserved and key > words causes problems. > Chris sql > >>CREATE TABLE tcl (id int(10) primary key not null, description > varchar(254), date timestamp, value int(11), department tinyint(3), text > text, fulltext(description,tex

Re: Re: How to Count(*) with LIMIT

2002-05-02 Thread Jeff Kilbride
> That would give the correct result, but it would still physically count all > the rows in the table which takes too long. This code will execute every > time a web page opens that has a grid. Some of the grid pages are quite > large, > 1 million rows. The person who designed the web page origina

Re: ensuring that I'm getting the correct "last insert ID"

2002-05-02 Thread Jeff Kilbride
Just make sure you call the last_insert_id() function before returning the connection to the pool. If you're using the mm.mysql driver in Java, you can cast the statement object to an org.gjt.mm.mysql.Statement object and use it's getLastInsertID() method: long lastInsertID = ((org.gjt.mm.mysql.S

FullText Search 3.23.49-nt

2002-05-02 Thread Jan Peuker
Good evening List, I have a problem on my fulltext-search. If I create the sample table from MySQL-Doc it runs perfect. If I create my own - it doesn't. I can't say more: Here is my dump: CREATE TABLE tcl (id int(10) primary key not null, description varchar(254), date timestamp, value int(11),

Re: mysql speed concerns

2002-05-02 Thread Gelu
Hi Anders, >How ever, this is probaly not > an interesstign discussion for the rest of the people who subscribes to > the mysql list. I AGREE. But... i consider this "place", offer a good opportunity to exchange ideas,knowledge and experiences about how we using or create MySQL application . In

RE: get one for each row

2002-05-02 Thread savaidis
The table has about 80 fields. I would something like: (this one creates a MySQL error) to one full row for every Location. I suppose I have to do it with a php script. (with limit 1 to the second query) You can see it at http://www.macedonia-hotels.gr Makis > -Original Message- > Fr

How to strip off email domain for sorting by domain?

2002-05-02 Thread Andrew Kuebler
I use Perl/DBI with MySQL and I'm trying to find a way to sort email addresses by domain. I would assume there is probably an option in MySQL to strip off the text after the '@' sign that will allow me to sort on. In Perl: @fields = split(/@/, $email); My domain would be displayed as: $fields[1]

Re: Help: SIGSEGV inside mysql_connect to remote server

2002-05-02 Thread Jeremy Zawodny
On Thu, May 02, 2002 at 09:21:14AM -0600, Guy Davis wrote: > On Thu, 2002-05-02 at 00:38, Jeremy Zawodny wrote: > > On Wed, May 01, 2002 at 04:24:05PM -0600, Guy Davis wrote: > > > > > I am having a really strange problem with a in-house C application > > > that calls mysql_connect() and generate

3.23 FullText 'AND' Search

2002-05-02 Thread Christopher Book
Hello, I'm having problems getting the fulltext search to return useful results. I wan't to query all the results in my table that contain all of the search words entered. I don't have mysql 4.0 so I can't use the binary search. If I use "... where match field against ('word1') and match field

Help! with mod_auth from apache integrating with mysql

2002-05-02 Thread Info_Best-IT
I have a databse on mysql server that authenticates users... However mod_auth did not have access to the database containing the user info. How can I set up my database with adequate permissions to allow mod_auth to access that database without leaving the database wide open... /Thanks Tim

RE: How to Count(*) with LIMIT

2002-05-02 Thread domi
Hi Again... !! > It is used to set up the navigator bar buttons for the grid on the web page > (PHP) so it says "<< < Page 1 of 18 > >>" with buttons on either side > of it. I'm a bit confused now... You are building a "pager" to a webpage, right ?? But, if You select with LIMIT 100 then

Re: finding values in TableA not in TableB

2002-05-02 Thread Alexander Keremidarski
Hi, Salada, Duncan wrote: >select events_terms.* from events_terms left join events on >events_terms.events_ID=events.events_ID where isnull(events.events_ID); > >Can anyone tell me if that looks like it should have the desired effect? It >seems to, but I am going to eventually be using this to

RE: get one for each row

2002-05-02 Thread Jay Blanchard
[snip from mysql list message] I tried and worked. But how can I show all fields of the rows? It doesn't accept any field before and shows every row after (if I put ) [/snip] Can we see your table? Can you also write out what you expect the results to be? Thanks! Jay Blanchard --

ROWID

2002-05-02 Thread Alain ROY
Hello ! Is there, in MySQL 4.0 database tables, a pseudo column ROWID (containing a unique id for each row of the tables), like in Oracle or Informix databases ? If not, will this feature be in MySQL 4.1 ? Regards A. ROY - B

RE: MySQL to Excel ?

2002-05-02 Thread Jay Blanchard
[snip] Are you satisfied? :) [/snip] Alexander, Thanks for the insight, yes I am satisfied! :) Did you see my solution with the IF statement in the SQL? select foo, if(bar = 'A', count(*), 0) as A, if(bar = 'B', count(*), 0) as B, if(bar = 'C', count(*), 0) as C from tblFOOBAR group by foo Giv

Re: Help: SIGSEGV inside mysql_connect to remote server

2002-05-02 Thread Guy Davis
On Thu, 2002-05-02 at 00:38, Jeremy Zawodny wrote: > On Wed, May 01, 2002 at 04:24:05PM -0600, Guy Davis wrote: > > > I am having a really strange problem with a in-house C application > > that calls mysql_connect() and generates a segfault deep within > > uname() when I configure it to contact a

Re: Re: How to Count(*) with LIMIT

2002-05-02 Thread Ryan Fox
- Original Message - From: "mos" <[EMAIL PROTECTED]> > > > I have a Where clause like: > > > select count(*) from table where LIMIT 100 > > > Unfortunately the Count(*) ignores the LIMIT clause entirely. Why? >> > >If You want to know the number of rows in the recordset retu

RE: get one for each row

2002-05-02 Thread savaidis
I tried and worked. But how can I show all fields of the rows? It doesn't accept any field before and shows every row after (if I put ) Thanks again Makis > -Original Message- > From: Jay Blanchard [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 02, 2002 3:23 PM > To: 'savaidis';

Re: MySQL to Excel ?

2002-05-02 Thread Alexander Keremidarski
Hi, Jay Blanchard wrote: >Howdy, > >I need to write some data out to Excel spreadsheets for some of our managers >to muddle with for projections. The query works fine... > >SELECT RecordID, RecordDate, count(*) AS Quantity >FROM tblFOO >Group By RecordID, RecordDate > >It returns; >+--+--

RE: ensuring that I'm getting the correct "last insert ID"

2002-05-02 Thread sean . odonnell
if you are using a connection pool the [close database connection] part of your example doesnt actually close the connection. so 1. Your code might be using several connections 2. Your code might use a different connection for each statement. 3. Even if your code only does use the one connection

Re: ensuring that I'm getting the correct "last insert ID"

2002-05-02 Thread denonymous
But would the same instance of a script drop and pick up different connections? I haven't done any Java/MySQL work, but anything I've done with PHP or Perl is based on a model of: [begin script] [open database connection(s)] [execute queries] [close database connection(s)] [end script] Is it mor

Re: ensuring that I'm getting the correct "last insert ID"

2002-05-02 Thread Alec . Cawley
You should not SELECT MAX(userID), you should SELECT LAST_INSERT_ID(), which gives you tha last id *generated by your connection* regarless of any others, This is general purpose. If you are willing to be MySQL specific, both C and Java (and, I presume, other languages) allow you to retrieve th

RE: ensuring that I'm getting the correct "last insert ID"

2002-05-02 Thread sean . odonnell
its used a lot by java. As setting up and closing down connections to the database is relatively expensive, you use a pool manager, when the connection is closed by your code, it gets returned to the pool of open connections and is'nt actually closed. just held open and returned next time you wan

RE: Re: How to Count(*) with LIMIT

2002-05-02 Thread Svensson, B.A.T. (HKG)
> I have a Where clause like: > select count(*) from table where LIMIT 100 > Unfortunately the Count(*) ignores the LIMIT clause entirely. Why? The answer is: Because the SQL query with COUNT(*) only returns one row... -

Re: inner select

2002-05-02 Thread Egor Egorov
Alex, Thursday, May 02, 2002, 5:38:49 PM, you wrote: A> i have to use a statement like: A> SELECT CODICE FROM TABSIC WHERE COM=1 AND SEN=1 AND PRI=1 A> AND CODICE<>ALL(SELECT CODICE_TABSIC FROM ARCHIVIO_SICU_MIN WHERE A> (CODICE_ARCHIVIO=342)) A> but mysql doesn't support inner select. Yes, MyS

Re: User Variables and Previous Row Question

2002-05-02 Thread Victoria Reznichenko
Jasmin, Thursday, May 02, 2002, 5:00:14 PM, you wrote: JB> I have been trying to use 'user variables' to keep JB> track of the previous row for use in a calculation of JB> the present row. Is there a way I can do this? Or JB> is there a better way in trying to use a previous JB> rows value in th

Re: finding values in TableA not in TableB

2002-05-02 Thread Egor Egorov
Salada, Thursday, May 02, 2002, 4:45:01 PM, you wrote: Seoen> I'm sure this question has been asked before, but I received an error while Seoen> attempting to search the list archives - so I apologize for redunancy. Seoen> I have two tables, events and events_terms, that have a common key, Seo

Re: Sorting letters in CZech

2002-05-02 Thread Victoria Reznichenko
Realy BIG PROBLEM czech users! n> In czech alphabet is letter ©(Š or alt+0138),¹ (š or n> alt+0154), the problem is with sorting some datas with this n> letter in front. n> For example names are: n> Adam, Frank, Eve, Martin, Zoe, ©omin , William, Steve [skip] n> it is same with lower-c

Re: ensuring that I'm getting the correct "last insert ID"

2002-05-02 Thread denonymous
Admittedly, I'm no expert. What *is* connection pooling? - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, May 02, 2002 11:21 AM Subject: RE: ensuring that I'm getting the correct "last insert ID" > what happens if you are using

RE: ensuring that I'm getting the correct "last insert ID"

2002-05-02 Thread sean . odonnell
what happens if you are using connection pooling though? -Original Message- From: denonymous [mailto:[EMAIL PROTECTED]] Sent: 02 May 2002 08:09 To: [EMAIL PROTECTED] Subject: Re: ensuring that I'm getting the correct "last insert ID" From: "Jonnycattt" <[EMAIL PROTECTED]> > Hi all, >

RE: RE: Verizon.net auto-reply

2002-05-02 Thread Svensson, B.A.T. (HKG)
sql,query > "Salada, Duncan" a ecrit : > > > > Is anyone else getting auto-replies from [EMAIL PROTECTED] when they post > > to the list? All the f*cking time. I sent mail to "security" and postmaster and asked them to please remove this user from the mailing list - no reaction so far.

RE: Re: How to Count(*) with LIMIT

2002-05-02 Thread mos
At 03:48 AM 5/2/2002, you wrote: > > I have a Where clause like: > > select count(*) from table where LIMIT 100 > > > > Unfortunately the Count(*) ignores the LIMIT clause entirely. Why? > > > >Because the query returns only ONE row and LIMIT limits rows, not values. >See ex. below

Fwd: Re: How to Count(*) with LIMIT

2002-05-02 Thread mos
>X-Sieve: CMU Sieve 2.1 >X-Mail-from: [EMAIL PROTECTED] >From: "Ryan Fox" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]>, "mos" <[EMAIL PROTECTED]> >Subject: Re: How to Count(*) with LIMIT >Date: Thu, 2 May 2002 08:42:28 -0400 >X-Mailer: Microsoft Outlook Express 6.00.2600. > >- Original Me

Re: ensuring that I'm getting the correct "last insert ID"

2002-05-02 Thread denonymous
From: "Jonnycattt" <[EMAIL PROTECTED]> > Hi all, > I know this has been asked a bunch of times, but i need some clarity (new > mySQL user). > I have an app that inserts a new user into one table, then inserts some user > preferences into another table. the procedure is as follows: > 1) insert new

JDBC on HPUX

2002-05-02 Thread Zengfa Gao
Hi, all: I meet a problem on HPUX. When I try to connect to MySQL with JDBC on HPUX. I connect to jdbc:mysql://localhost:3306/mysql with "root", it failed. But it works before. Someone told me that it is becuase of some changes of DNS. When I connect to MySQL, MySQL translate "root" to "[EMAIL P

Re: Verizon.net auto-reply

2002-05-02 Thread Joseph Bueno
"Salada, Duncan" a écrit : > > Is anyone else getting auto-replies from [EMAIL PROTECTED] when they post > to the list? > > Duncan > [p.s. SQL just for the nice filter] > Yes. I have added their email to my spam filter. -- Joseph Bueno NetClub/Trader.com -

inner select

2002-05-02 Thread Alex
i have to use a statement like: SELECT CODICE FROM TABSIC WHERE COM=1 AND SEN=1 AND PRI=1 AND CODICE<>ALL(SELECT CODICE_TABSIC FROM ARCHIVIO_SICU_MIN WHERE (CODICE_ARCHIVIO=342)) but mysql doesn't support inner select. What statement should i use instead of this one ? Thanks... Alex. ---

ensuring that I'm getting the correct "last insert ID"

2002-05-02 Thread Jonnycattt
Hi all, I know this has been asked a bunch of times, but i need some clarity (new mySQL user). I have an app that inserts a new user into one table, then inserts some user preferences into another table. the procedure is as follows: 1) insert new user 2) query for that user's id using select max(u

RE: data compare and duplicate entries..

2002-05-02 Thread Steve Bradwell
Are you writing a php script, perhaps with a form and a submit button, that connects to mysql? -Steve. -Original Message- From: Tech @NorthWeb [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 02, 2002 9:32 AM To: mysql Subject: Fw: data compare and duplicate entries.. hi, I was looking f

mysql@lists.mysql.com

2002-05-02 Thread root
>Description: >How-To-Repeat: >Fix: >Submitter-Id: >Originator:root >Organization: >MySQL support: [none | licence | email support | extended email support ] >Synopsis: >Severity: >Priority: >Category: mysql >Class: >Release:

RE: Verizon.net auto-reply

2002-05-02 Thread Jay Blanchard
[snip] Is anyone else getting auto-replies from [EMAIL PROTECTED] when they post to the list? [/snip] Yes, and a couple of others. Plus some of my posts seem to be posting twice. Greeting MySQL mail-list manager, no-spam here! :) Jay Blanchard

RE: get one for each row

2002-05-02 Thread Jay Blanchard
[snip] It might be faster to instead of getting the list of cities and then in seperate queries get all hotels for each city, to just sort by city and fetch all, and in your application check if it has found a next city already. [/snip] Of course, you could use a single crosstab query and get som

Problems with MySQL on FreeBSD4.5

2002-05-02 Thread webmaster
I'm having trouble with a MySQL installation on a FreeBSD4.5 system (MYSQL version 3.23.49). >From time to time top shows that it runs >98% of CPU time, and of course the site's >response gets sluggish... Sometimes queries even times out or MySQL reports that no sockects are free to complete th

Verizon.net auto-reply

2002-05-02 Thread Salada, Duncan
Is anyone else getting auto-replies from [EMAIL PROTECTED] when they post to the list? Duncan [p.s. SQL just for the nice filter] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.

Re: get one for each row

2002-05-02 Thread Issvar
It might be faster to instead of getting the list of cities and then in seperate queries get all hotels for each city, to just sort by city and fetch all, and in your application check if it has found a next city already. Example in php: $res=mysql_query('select hotel,city from hotels order by ci

User Variables and Previous Row Question

2002-05-02 Thread Jasmin Bertovic
I have been trying to use 'user variables' to keep track of the previous row for use in a calculation of the present row. Is there a way I can do this? Or is there a better way in trying to use a previous rows value in the present row. For example; SELECT number as current_day, (number - ) as c

RE: [thelist] MySQL to Excel Problem Pivot Table SOLVED!

2002-05-02 Thread Jay Blanchard
[snip 1] You could do that for the RecordID if you do not know what they are (I knew what RecordID's existed, so I could specifiy an IF statement for each). If I remember correctly you could even have SQL produce do the code for you. In PHP you could do it any number of ways (pseudocode follows -

RE: [thelist] MySQL to Excel Problem Pivot Table SOLVED!

2002-05-02 Thread Andrew Hazen
Yeah, that's about what I thought too. Certainly looks like it would work. Depending on the size of the table you end up doing two fairly large db calls, but that's gotta be faster and simpler than all the other data manipulation. You could then add "Into outfile blah blah", and get it all done

RE: [thelist] MySQL to Excel Problem Pivot Table SOLVED!

2002-05-02 Thread Jay Blanchard
[snip] Fascinating. But how do you build the SELECT? Seems to me you would first have to "SELECT RecordID FROM tblClass10" and then script an iteration to build the whole series of IF clauses. Or did I miss something? [/snip] You could do that for the RecordID if you do not know what they are

finding values in TableA not in TableB

2002-05-02 Thread Salada, Duncan
I'm sure this question has been asked before, but I received an error while attempting to search the list archives - so I apologize for redunancy. I have two tables, events and events_terms, that have a common key, events_ID. Now I want to find the rows in events_terms that have an events_ID t

RE: data compare and duplicate entries..

2002-05-02 Thread Andrew Hazen
Not sure of your scripting language, but this logic should work. Just apply it to each web_form variable posted. Select count(*) as number FROM table WHERE field=value_from_web_form If number==0 then do your inserts Else Echo "Sorry, field=value_from_web_form data already exists."; Reset f

Re: Problem with SELECT

2002-05-02 Thread Sheni R. Meledath
Many Thanks for your quick reply. The MySQL version is 3.22 on Unix/FreeBSD/Apache. thanks At 08:43 AM 5/2/02 -0500, Gerald Clark wrote: >Unfortunately, you did not tell us what version you are running, or what >platform you are running it on. > > >Try rebuilding the indexes with myisamchk or

Re: Problem with SELECT

2002-05-02 Thread Gerald Clark
Unfortunately, you did not tell us what version you are running, or what platform you are running it on. Try rebuilding the indexes with myisamchk or whatever is appropriate for your table type. Sheni R. Meledath wrote: > Hello: > > I have a problem while selecting the records from a table.

Fw: data compare and duplicate entries..

2002-05-02 Thread Tech @NorthWeb
hi, I was looking for an SQL statement or script that whould allow me to compare data when it was entered into a mysql-php field on a web page so that it checks whether the data entered has not been used before in the database.. In short, when data needs to be entered, the statement/script must ch

RE: [thelist] MySQL to Excel Problem Pivot Table SOLVED!

2002-05-02 Thread Andrew Hazen
Fascinating. But how do you build the SELECT? Seems to me you would first have to "SELECT RecordID FROM tblClass10" and then script an iteration to build the whole series of IF clauses. Or did I miss something? Andrew Hazen -Original Message- From: Gabriel [mailto:[EMAIL PROTECTED]]

RE: Self Join in mysql

2002-05-02 Thread Svensson, B.A.T. (HKG)
> This question I am posting for a friend Below is post to another list... > As always the answer is: "It depends on!" ;) > How does one create a self-join in MySQL tables? I've only played a little > with SQL selects so far, some inner joins, and now I have to create a > many-to-many rela

Re: How to Count(*) with LIMIT

2002-05-02 Thread Ryan Fox
- Original Message - From: "mos" <[EMAIL PROTECTED]> > I have a Where clause like: > select count(*) from table where LIMIT 100 > > Unfortunately the Count(*) ignores the LIMIT clause entirely. Why? You could use least(). mysql> select least(count(*),30) from ct; +-

Sorting letters in CZech

2002-05-02 Thread nicronom
Realy BIG PROBLEM czech users! In czech alphabet is letter Š(Š or alt+0138),š (š or alt+0154), the problem is with sorting some datas with this letter in front. For example names are: Adam, Frank, Eve, Martin, Zoe, Šomin , William, Steve if you sort it (normaly) it should looks like this

RE: get one for each row

2002-05-02 Thread Jay Blanchard
[snip] I have one table with about 1000 hotels and name or the city they belong. I want to run a query to get one row for every city only, to put it in a pull down menu in the search form. How is that? [/snip] SELECT DISTINCT city FROM tblFOO So if you have this table; +---+

Re: Grants, rights, permissions

2002-05-02 Thread Victoria Reznichenko
Thomas, Wednesday, May 01, 2002, 9:39:24 PM, you wrote: TS> I am having some trubble understanding, how permissions work with MySQL: TS> I've set up user, database, and host permissions: TS> User: Hosts:PW: Permissions: TS> tps Any pwAll TS> Anonymo

Re: transactions

2002-05-02 Thread Victoria Reznichenko
John, Thursday, May 02, 2002, 3:17:59 PM, you wrote: JN> I would greately appreciate if someone could advise me on which version of JN> MySQL supports transactions ? Transaction is supported with transaction-safe tables (InnoDB, BDB). http://www.mysql.com/doc/T/a/Table_types.html JN>

Re: get one for each row

2002-05-02 Thread Victoria Reznichenko
savaidis, Thursday, May 02, 2002, 11:07:18 AM, you wrote: s> I have one table with about 1000 hotels and name or the city they belong. s> I want to run a query to get one row for every city only, to put it in a s> pull down menu in the search form. s> How is that? Try SELECT DISTINCT city FROM y

Re: foreign key ?

2002-05-02 Thread Egor Egorov
shimak, Thursday, May 02, 2002, 11:22:38 AM, you wrote: s> How to use foreign key in mysql. :) I think checking MySQL manual will be usefull for you: http://www.mysql.com/doc/S/E/SEC445.html http://www.mysql.com/doc/e/x/example-Foreign_keys.html http://www.mysql.com/doc/A

Re: Re: How to Count(*) with LIMIT

2002-05-02 Thread Egor Egorov
mos, Thursday, May 02, 2002, 8:11:33 AM, you wrote: m> I have a Where clause like: m> select count(*) from table where LIMIT 100 m> Unfortunately the Count(*) ignores the LIMIT clause entirely. Why? Because first of all SELECT is executed and then LIMIT is applied. m> It seems t

transactions

2002-05-02 Thread John Noronha
I would greately appreciate if someone could advise me on which version of MySQL supports transactions ? Thanks, John - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/

Re: get one for each row

2002-05-02 Thread Pradeep Dsouza
Try this Table : col1 : col2 1. Hotel 1 $col2 } ?> Pradeep Naharonline.com - Original Message - From: "savaidis" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 02, 2002 1:37 PM Subject: get one for each row > > I have one table with about 1

  1   2   >