query problem

2002-05-02 Thread saraswathy saras
hi everyboby, How to select latest 3 days records from the table according to the latests date. The data is like this:- name date a 02-03-01 b 02-03-15 c 02-03-20 d 02-03-20 e 02-04-28 f 02-04-28 g 02-04-30 The result should be like this:- name date g

Solved (Re: 4.0.2 Replication still buggy...)

2002-05-02 Thread Jeremy Zawodny
1On Fri, Apr 26, 2002 at 09:11:52AM -0700, Jeremy Zawodny wrote: I started it up and it ran for about a day before it ran into a duplicate key error. The 3.23.47 slave hasn't hit the duplicate key error, nor have any of our other slaves. So it is a 4.0.2 bug of some sort. This has been

Re: Good color coded SQL editor for MySQL?

2002-05-02 Thread Jeremy Zawodny
On Wed, May 01, 2002 at 10:27:57PM +0100, Stewart Douglas wrote: GNU Emacs and sql-mode. :-) -- Jeremy D. Zawodny, [EMAIL PROTECTED] Jeremy I'm a big fan of sql-mode with Emacs for accessing Sybase servers at work, how do I config it to point to MySQL on my local machine

Re: mysql speed concerns

2002-05-02 Thread Jeremy Zawodny
On Wed, May 01, 2002 at 10:49:36AM -0400, Jason Yates wrote: Currently our MySQL server runs around 20-30 queries per second. The upper management decided they wanted to add about 4 times the customers in the next two or three weeks. I'm worried that MySQL on this particular box won't be

foreign key ?

2002-05-02 Thread shimak
Hello ! How to use foreign key in mysql. I am using mysql 3.23.36 Thanx in advance Regards Shimak - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the

FreeBSD threads

2002-05-02 Thread Simon Green
Hi We using FreeBSD 4.5 and MySQL 3.23.49 with native threads... It uses a lot of CPU and mite not be using both CPU's? So we have seen that compiling with Linux threads can help Do with just ./configure --with-named-threads-libs=??? What is the complete statement? And do we need to put

Re: Help: SIGSEGV inside mysql_connect to remote server

2002-05-02 Thread Jeremy Zawodny
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 remote server. Using a local MySQL server works fine as

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

2002-05-02 Thread domi
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: SELECT count(login) FROM accounts WHERE

Re: mysql uses 99% cpu under freebsd 4.3

2002-05-02 Thread Jeremy Zawodny
On Wed, May 01, 2002 at 09:15:25PM +0200, Gunnar Helliesen wrote: List, Re: http://lists.mysql.com/cgi-ez/ezmlm-cgi?1:sss:71261:200104:iidpojcdbmgdbajh aobn#b I have this exact problem on a single-CPU P-III 500 running FreeBSD 4.5-RELEASE, generic kernel. MySQL is 4.0.1-alpha. I have

get one name for each row

2002-05-02 Thread savaidis
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? Makis - Before posting,

Re: How to Count(*) with LIMIT

2002-05-02 Thread George Pitcher
Can't you use the num_rows funtion to provide the count? George - Original Message - From: mos [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 02, 2002 6:11 AM Subject: Re: How to Count(*) with LIMIT I have a Where clause like: select count(*) from table where

Fw: How to Count(*) with LIMIT

2002-05-02 Thread George Pitcher
Sorry, taken out of context please ignore my first response. George - Original Message - From: George Pitcher [EMAIL PROTECTED] To: [EMAIL PROTECTED]; mos [EMAIL PROTECTED] Sent: Thursday, May 02, 2002 9:46 AM Subject: Re: How to Count(*) with LIMIT Can't you use the num_rows funtion

Re: query problem

2002-05-02 Thread Anvar Hussain K.M.
Hi, This might work for you: select @tempvar := max(datecolumn) from tablename group by datecolumn order by datecolumn desc limit 3; select * from tablename where datecol = @tempvar order by datecolumn desc; Anvar. At 06:12 AM 02/05/2002 +, you wrote: hi everyboby, How to select latest 3

RE: mysqlimpor and fixed length files.

2002-05-02 Thread Michael Widenius
Hi! Ramon == Ramon Arias [EMAIL PROTECTED] writes: cut Ramon I haven't done the big file yet... I did a smaller one that was 50 gigs, and Ramon it loaded fine after a few hours. (about 3) in a pc with tons of ram and Ramon scsi stripped drives. However each index take about 3-5 hours to

Self Join in mysql

2002-05-02 Thread Scott Haneda
This question I am posting for a friend Below is post to another list... 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

RE: query problem

2002-05-02 Thread Roger Baklund
* saraswathy saras How to select latest 3 days records from the table according to the latests date. The data is like this:- name date a 02-03-01 b 02-03-15 c 02-03-20 d 02-03-20 e 02-04-28 f 02-04-28 g 02-04-30 The result should be like this:-

Reply to this lists goes to sender!!! ????

2002-05-02 Thread Scott Haneda
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? Am I on a weird sql list here? - Scott HanedaTel: 415.898.2602 http://www.newgeo.com

Re: mysql speed concerns

2002-05-02 Thread Gelu
.sorry ... RFC 793 - Original Message - From: Gelu [EMAIL PROTECTED] To: Michael Chang [EMAIL PROTECTED] Cc: Svensson, B.A.T. (HKG) [EMAIL PROTECTED]; Jason Yates [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, May 02, 2002 10:52 AM Subject: Re: mysql speed concerns TCP/IP is a

RE: foreign key ?

2002-05-02 Thread Roger Baklund
* shimak How to use foreign key in mysql. I am using mysql 3.23.36 Just do it... :) A foreign key is a field in a table referencing the primary key of another table. In mysql you don't need to specify which columns are foreign keys, you just use them in a join, and mysql will do the rest.

Re: mysql speed concerns

2002-05-02 Thread Gelu
TCP/IP is a protocol for data interchange, host to host, on the network (RFC731). Sockets ,indeed , are also used for IPC. _ G.NET SOFTWARE COMPANY Permanent e-mail address : [EMAIL PROTECTED] [EMAIL

Re: query problem

2002-05-02 Thread Jan Peuker
Uhm, 3? Didn't you wrote 5? If you want just 3 do this: SELECT name,date FROM dates ORDER BY date LIMIT 0,3 regars, Jan - Original Message - From: saraswathy saras [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 02, 2002 8:12 AM Subject: query problem hi everyboby,

Re: query problem

2002-05-02 Thread Anvar Hussain K.M.
Hi, This might work for you: select @tempvar := max(datecolumn) from tablename group by datecolumn order by datecolumn desc limit 3; select * from tablename where datecol = @tempvar order by datecolumn desc; Anvar. At 06:12 AM 02/05/2002 +, you wrote: hi everyboby, How to select latest 3

Re: How to Count(*) with LIMIT

2002-05-02 Thread Joseph Bueno
Hi, LIMIT is applied AFTER select is executed and limits then number of rows returned to the client. Since SELECT COUNT(*)... generates a single row, LIMIT is useless. You can do this : SELECT somefield from LIMIT 100 and check the number of rows actually returned. I don't know which

Re: deleted tabels in innodb file

2002-05-02 Thread Jeremy Zawodny
On Wed, May 01, 2002 at 04:10:38PM +0200, Svend Erik H. Jørgensen wrote: Some how i have manged to delete a database, i'm not quite sure how. When i try to create the table's i get an error : 020501 15:08:38 InnoDB: Error: table noah/user already exists in InnoDB internal InnoDB: data

Re: get one name for each row

2002-05-02 Thread Pradeep Dsouza
Try this Table : col1 : col2 1. Hotel 1 select name = my_selection ?php include config.php; $res = mysql_query(SELECT * FROM tname); while ($row = mysql_fetch_array($res)) { $col1 = $row[col1]; $col2 = $row[col2]; option value = \$col1\

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: 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 to

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

Re: get one name 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

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: 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 Anonymous

RE: get one name 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;

Sorting letters in CZech

2002-05-02 Thread nicronom
Realy BIG PROBLEM czech users! In czech alphabet is letter (#138 or alt+0138), (#154 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

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;

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

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]]

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

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.

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: 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

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

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

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 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 -

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 -

Re: get one name 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

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)

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 the

RE: get one name 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

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

synopsis of the problem (one line)

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

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

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

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 CODICEALL(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.

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

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

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 user 2)

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 Message - From:

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: SELECT

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: 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, I know

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: Sorting letters in CZech

2002-05-02 Thread Victoria Reznichenko
nicronom, Thursday, May 02, 2002, 3:36:47 PM, you wrote: n 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,

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, Seoen

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 the

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: 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

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

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

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

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: get one name for each row

2002-05-02 Thread savaidis
I tried select distinct Location from hotels1 order by Location and worked. But how can I show all fields of the rows? It doesn't accept any field before distinct and shows every row after distinct (if I put select distinct Location, Name ... ) Thanks again Makis -Original Message-

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 returned by the

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 remote

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

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 -

RE: get one name for each row

2002-05-02 Thread Jay Blanchard
[snip from mysql list message] I tried select distinct Location from hotels1 order by Location and worked. But how can I show all fields of the rows? It doesn't accept any field before distinct and shows every row after distinct (if I put select distinct Location, Name ... ) [/snip] Can we see

Re: finding values in TableA not in TableB

2002-05-02 Thread Alexander Keremidarski
Hi, Salada, Duncan wrote: cut 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: 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 I assume

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

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

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 generates a

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:

RE: get one name for each row

2002-05-02 Thread savaidis
The table has about 80 fields. I would something like: select *, distinct Location from hotels order by Name (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

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 this

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: 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 =

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 originally

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,text))

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: User Variables and Previous Row Question

2002-05-02 Thread Alexander Keremidarski
Hi, Jasmin Bertovic wrote: cut For example; SELECT number as current_day, (number - prevnumber) as change_from_prev_day FROM TABLE ORDER BY DATE prevnumber 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

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,

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: 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: 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 experience

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

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

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 in the

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 file

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-application?

  1   2   >