Re: Problem searching in grouped rows

2006-06-26 Thread Barry
Barry schrieb: Hello everyone! I have a problem with matching in grouped rows. I have: - one DB with customers - one DB with advertisement articles - one DB that holds what customer got which article the linked DB looks like: CREATE TABLE adverticlelink ( c_id int(11) NOT NULL, aa_id

¿mysql_stmt_bind_param under windows bug?

2006-06-26 Thread Arias Gonzalez, Javier
I tried to execute the example code (see below) from the function mysql_stmt_execute I found in mysql 4.1 documentation (http://dev.mysql.com/doc/refman/4.1/en/mysql-stmt-execute.html). This source code runs perfect under linux red hat with version 4.1.7 but it prints out an error if I try to

your chance

2006-06-26 Thread ismailonur
Please, read and let me know what do you feel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

SSL on MySQL 5.0.22

2006-06-26 Thread Asif Lodhi
Hi, I am using 5.0.22 on Windows. As I read in the reference manual, almost ALL SSL values/options are specific to 5.1.x versions. Do I stand _ANY_ chance to use SSL anyway? Specifically, I want to know exactly HOW I can enable SSL support for MySQL on Windows using which options, variables,

Re: your chance

2006-06-26 Thread Jo�o C�ndido de Souza Neto
I read that message and had no feelings. [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] Please, read and let me know what do you feel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: your chance

2006-06-26 Thread Jad madi
Same here On Mon, 2006-06-26 at 06:46 -0300, João Cândido de Souza Neto wrote: I read that message and had no feelings. [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] Please, read and let me know what do you feel -- MySQL General Mailing List For list archives:

Re: what is selectivity?

2006-06-26 Thread Joerg Bruehe
Hi! leegold wrote: Reading about DBs I am seeing the term selectivity. What does it mean? Seems like it has something to do with the distribution or pattern of data in tables(?) Right, it does. A search criterion is highly selective if it _ex_cludes a high proportion of the data. My

Re: Problem searching in grouped rows

2006-06-26 Thread Brent Baisley
I'll give it a shot. First, select the people that got the first advertisement: SELECT c_id,aa_id FROM adverticelink WHERE aa_id=4 From that result, you want to additionally filter out who didn't get the second advertisement. Since that information is contained in the same table, you want to

Re: selecting data from 2 local DBs with same table structure

2006-06-26 Thread Cx Cx
Thanks Peter, this should give me a head start. I will try it and mail again if I get stuck. Craig On 6/25/06, Peter Brawley [EMAIL PROTECTED] wrote: I need the query to select the data from table1 on db1 and then select the data from table1 on db2 and return a result of where if a field

FreeBSD 6 and MySQL with DBs on a NAS

2006-06-26 Thread mysql-archive
*** This happens for me using FreeBSD 6.0 or FreeBSD 6.1 with the most recent MySQL 4.1 or 5.0 built from ports and when the DBMS data files reside on a NetApp NAS share shared over NFS. It only seems to happen with very frequently written-to tables. I sent this to the list last week and no

Re: ¿mysql_stmt_bind_param under windows bug?

2006-06-26 Thread Chris White
On Monday 26 June 2006 01:04 am, Arias Gonzalez, Javier wrote: memset(bind, 0, sizeof(bind)); This is probably your issue right here. You've already got bind[3] with storage allocation for 3 MYSQL_BIND's. Now you're filling bind[0] with 0's, effectively erasing the allocated MYSQL_BIND in

SSL on MySQL 5.0.22

2006-06-26 Thread Asif Lodhi
Hi, How can I connect from a Windows client (VB/ODBC Connector) to a MySQL Server 5.0.22, also running on Windows (Max version installed as a service using Local-Service Account) with all tables using InnoDB storage engine USING SSL? Perhaps using OpenSSL on a Linux-based installation would be

Multiple Entries

2006-06-26 Thread Nicholas Vettese
If I have a multiple choice on a form and want to store that in my DB, then how should I set up my table? I have been reading up on these, but everyone seems to have a different opinion on how to accomplish this task. What I am looking to do give the user a few options to check when

Re: A lot of HD Writing

2006-06-26 Thread mos
At 10:36 AM 6/25/2006, Santiago del Castillo wrote: Hi, thanks for answering! I am using MyISAM tables. So, based in your answer i assume that is usual to have a lot of HD Writing, isn't it? Only if your application is writing to the database. If you have no application running, then MySQL

Re: Multiple Entries

2006-06-26 Thread JamesDR
Nicholas Vettese wrote: If I have a multiple choice on a form and want to store that in my DB, then how should I set up my table? I have been reading up on these, but everyone seems to have a different opinion on how to accomplish this task. What I am looking to do give the user a few options

Re: Multiple Entries

2006-06-26 Thread Chris White
On Monday 26 June 2006 08:03 am, Nicholas Vettese wrote: If I have a multiple choice on a form and want to store that in my DB, then how should I set up my table? I have been reading up on these, but everyone seems to have a different opinion on how to accomplish this task. What I am looking

Re: Unknown tables

2006-06-26 Thread Jesse
Oh, OK. Well, guess which driver I'm using... InnoDB. :-) Oh well. Thanks, Jesse - Original Message - From: Quentin Bennett [EMAIL PROTECTED] To: Jesse [EMAIL PROTECTED]; MySQL List mysql@lists.mysql.com Sent: Sunday, June 18, 2006 5:28 PM Subject: RE: Unknown tables but I assume

Defaulting Date Field

2006-06-26 Thread Jesse
What is the best way to default a date/time field to the current date/time? I've tried using Now(), but I get an error of course. The only other way I know of to do this is to add a trigger, which I can do, but I find them bothersome, because they don't tend to backup and restore properly. Is

help on join query

2006-06-26 Thread Nhadie
Hi All, Given this table: +-+-+++- |sip_status | sip_method | sip_callid | username | fromtag| totag

Re: Windows Compiled Help MySQL Reference Manual -- Error

2006-06-26 Thread Jake Peavy
On 6/13/06, Jake Peavy [EMAIL PROTECTED] wrote: On 6/7/06, Jake Peavy [EMAIL PROTECTED] wrote: On 6/7/06, Paul DuBois [EMAIL PROTECTED] wrote: At 17:30 -0600 6/7/06, Jake Peavy wrote: Hey yall, I'm unable to open the .chm I just downloaded for 5.1. I get the following error:

Re: Defaulting Date Field

2006-06-26 Thread Dan Buettner
Jesse, a TIMESTAMP column in your table can be set to have the 'now' value when a row is inserted, or updated, or both. http://dev.mysql.com/doc/refman/5.0/en/timestamp-4-1.html Note the warning about TIMESTAMP behavior differing significantly prior to 4.1. Dan Jesse wrote: What is the

Re: error loading data from file ERROR 1329 (02000): No data - zero rows fetched, selected, or processed

2006-06-26 Thread Ferindo Middleton
Does MySQL have any constraints when it comes to the number columns that it can accurately support/import in any one table/file. When I see this file that is failing to get properly read into the database, that's what comes to mind... It's failing because of some kind of constraint or threshold

Re: error loading data from file ERROR 1329 (02000): No data - zero rows fetched, selected, or processed

2006-06-26 Thread Dan Buettner
Ferindo - I believe there is a 64K limit on the length of a record in a MyISAM table (text and binary columns excluded), but I haven't ever seen a number of columns limit. Based on your table description below I don't think you're close to such a problem. Based on the error you receive (no

Query Speed

2006-06-26 Thread Jesse
I have a query which I can execute in Microsoft SQL, and it's instantaneous. However, In MySQL, I've only been able to get it down to 48 seconds: SELECT S.State, ST.StateName, S.Sub, C.ChapterType, (SELECT Count(*) FROM (Members M JOIN Chapters C1 ON C1.ID=M.ChapterID) JOIN Schools S1 on

RE: Query Speed

2006-06-26 Thread Price, Randall
Hi Jesse, I am not 100% sure cause I have only been using MySQL for ~6 months but I do read this mailing list everyday and have learned a lot. I believe that InnoDB tables to not maintain a count(*) for the tables so it has to physically count the rows. I believe MyISAM tables do maintain that

ASP Reporting EOF?

2006-06-26 Thread Jesse
When I run the following query in my ASP Application: SELECT S.State, S.Sub, S.Region, S.District, Sum(Males) AS TotMales, Sum(Females) AS TotFemales, Sum(AfricanAmerican) AS TotAfricanAmericans, Sum(Asian) AS TotAsians, Sum(Caucasian) AS TotCaucasians, Sum(Hispanic) AS TotHispanics,

Re: Query Speed

2006-06-26 Thread Jesse
On the chance that such a thing were actually happening, I converted all of my tables over to MyISAM, because it says that it is very fast, and I'm not using Transactions anyway. If that's the only feature that InnoDB gives me, I'd much rather have the speed. Anyway, it actually increased the

Re: Query Speed

2006-06-26 Thread Dan Buettner
Jesse, can you post table structures ( SHOW CREATE TABLE tablename ) and the output you get from EXPLAIN followed by the query below? Also what version of MySQL you're on, and high level details of the hardware (RAM, disks, processors, OS). That will all be helpful in trying to help you out

Re: Upgrading from 3.23.58 5.0.22?

2006-06-26 Thread Dan Buettner
Dan, I haven't seen any other responses, so I'll chime in with my $.02. I think you should have very few problems upgrading from 3.23.58 to 5.0.22. I think you will in fact be able to do pretty much what you describe. I've upgraded in both fashions in the past (re-importing mysqldump

RE: ASP Reporting EOF?

2006-06-26 Thread J.R. Bullington
When you run the query in the Query Browser, do any of the records return a 'NULL' value? If so, then MS's ASP engine would return an EOF because MySQL's NULL is NOT the same as objRS(fld.name) = . J.R. -Original Message- From: Jesse [mailto:[EMAIL PROTECTED] Sent: Monday, June 26,

Re: Upgrading from 3.23.58 5.0.22?

2006-06-26 Thread Daniel da Veiga
On 6/25/06, Dan Trainor [EMAIL PROTECTED] wrote: Good morning, all - I've read for quite a while tonight, but still haven't been able to figure out - can I upgrade directly from 3.23.58 to 5.0.22? I've read that I'd have to do something like 3.23.58 4.0 4.1 5.0.22, but then also the

Re: Query Speed

2006-06-26 Thread Dan Buettner
EXPLAIN output is a good way to see how MySQL is planning to execute your query - which indexes it chooses to use, how much work it thinks it needs to do for each table reference. My understanding is that you can get an approximate / rough idea of operations needed by multiplying all the

Leading zero where strlen 5

2006-06-26 Thread Scott Haneda
I need to update a column, if the string length is less than 5, I want to add leading zeros to it until it has 5. These are zip codes, I think there are no 00 leading zips, so most should all be four chars long. -- - Scott Haneda

RE: Leading zero where strlen 5

2006-06-26 Thread J.R. Bullington
The best way to do this is with code, however, here is A way to do it (I am sure that there are more than one...) UPDATE tbl_Name SET ZipCodes = concat('0',ZipCodes) WHERE length(ZipCodes) = 4 Of course, this will involve you changing the length() if the ZipCode has only 3 digits. Also, of

Merging two fields; references to fields

2006-06-26 Thread Andreas Bauer
Hello NG, I have two tables, three and four fields inside, in my mysql database, created with phpmyadmin: t_authors 1 authorid (primary key, auto_increment) 2 lastname 3 firstname t_books 1 bookid (primary key, auto_increment) 2 authorid (Typ:index, reference to t_authors.authorid, done with

Re: Leading zero where strlen 5

2006-06-26 Thread Mike Wexler
J.R. Bullington wrote: The best way to do this is with code, however, here is A way to do it (I am sure that there are more than one...) UPDATE tbl_Name SET ZipCodes = concat('0',ZipCodes) WHERE length(ZipCodes) = 4 How about UPDATE tbl_Name SET ZipCodes = right(concat('0',ZipCodes),

Re: Leading zero where strlen 5

2006-06-26 Thread Scott Haneda
J.R. Bullington wrote: The best way to do this is with code, however, here is A way to do it (I am sure that there are more than one...) UPDATE tbl_Name SET ZipCodes = concat('0',ZipCodes) WHERE length(ZipCodes) = 4 How about UPDATE tbl_Name SET ZipCodes =

Re: Query Speed

2006-06-26 Thread Dan Buettner
Sorry, I had an extra '9' in there. Math is actually: 54 * 69 * 1 * 65 * 1 * 2 * 1 * 65 * 1 * 24 = 755632800 Still a lot of operations, and if you index the state field, you can potentially reduce it by a factor of 54. Dan Dan Buettner wrote: EXPLAIN output is a good way to see how MySQL

Records in front of and behind another record

2006-06-26 Thread Scott Haneda
Mysql 4 I have a frustrating case here, a list of numbers, say, 0 through 30,000 or so, however, there are gaps in the numbers, so not purely sequential. I am faced with selecting one record from the dataset, that's simple, however, before that select, I need to make sure the record is there,

Re: FreeBSD 6 and MySQL with DBs on a NAS

2006-06-26 Thread Greg 'groggy' Lehey
On Monday, 26 June 2006 at 10:41:16 -0400, [EMAIL PROTECTED] wrote: *** This happens for me using FreeBSD 6.0 or FreeBSD 6.1 with the most recent MySQL 4.1 or 5.0 built from ports and when the DBMS data files reside on a NetApp NAS share shared over NFS. It only seems to happen with very

Re: Records in front of and behind another record

2006-06-26 Thread Scott Haneda
Mysql 4 I have a frustrating case here, a list of numbers, say, 0 through 30,000 or so, however, there are gaps in the numbers, so not purely sequential. I am faced with selecting one record from the dataset, that's simple, however, before that select, I need to make sure the record is

Re: Records in front of and behind another record

2006-06-26 Thread Scott Haneda
Mysql 4 I have a frustrating case here, a list of numbers, say, 0 through 30,000 or so, however, there are gaps in the numbers, so not purely sequential. I am faced with selecting one record from the dataset, that's simple, however, before that select, I need to make sure the record is

Is the fsync() fake on FreeBSD6.1?

2006-06-26 Thread leo huang
Hi, I benchmarked MySQL 4.1.18 on FreeBSD 6.1 and Debian 3.1 using Super Smack 1.3 some days ago. The benchmark table is CREATE TABLE `Account` ( `aid` int(11) NOT NULL auto_increment, `name` char(20) NOT NULL default '', `flag` int(11) NOT NULL default '0', `uidcount` int(11) NOT NULL

Server at 99%

2006-06-26 Thread Kim Kohen
Folks, please forgive the newbie panic but I believe I've gotten myself into trouble. After experiencing some problems with a db I decided to run the 'Repair' commands from the MySQL Administrator program. After failing to find anything significant I (somewhat foolishly) ran the Use FRM

Re: Records in front of and behind another record

2006-06-26 Thread Michael Stassen
Scott Haneda wrote: Mysql 4 I have a frustrating case here, a list of numbers, say, 0 through 30,000 or so, however, there are gaps in the numbers, so not purely sequential. I am faced with selecting one record from the dataset, that's simple, however, before that select, I need to make

Re: Records in front of and behind another record

2006-06-26 Thread Scott Haneda
OK, that's clear. Sorry about the bervity, ill clear this up below. Scott Haneda wrote: I am thinking UNION and two SQL queries would do this, how is UNION optimized, is it more or less the same as running two selects? Usually, but a UNION of what two queries? I won't comment on the