Re: DISTINCT LEFT JOIN

2003-02-11 Thread Nasser Ossareh
try something like this:

select site_id, max(service_date), name from
site_service left join site on site.id =
site_service.site_id group by site_id;




--- Tom Beidler [EMAIL PROTECTED] wrote:
 I¹m having problems with a left join. I¹m not even
 sure if I should be using
 a left join.
 
 I have two tables; sites and site_service.
 Site_service contains service
 dates for the sites. I¹m trying to write a query
 that will select each site
 and the last service date for that site. A site may
 have many service dates
 or none at all. Here¹s what I¹ve tried so far but it
 pulls down all of the
 service dates for a site if it has more then one and
 I only want the last
 date.
 
 SELECT DISTINCT site.id, site.site_id, site.name,
 site_service.service_date,
 site.service_order FROM site LEFT JOIN site_service
 ON site.id =
 site_service.site_id WHERE site.company = 'company'
 ORDER BY
 site_service.service_date DESC
 
 When I run the above I retrieve every service date
 for a given site if it
 has more then one. If I remove the
 site_service.service_date from the SELECT
 portion it retrieves only one site but I need at
 least the latest date so
 that doesn¹t help.
 
 Any help appreciated.
 
 Tom
 


__
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Can mysql execute this ? how can i do this ?

2003-02-10 Thread Nasser Ossareh
Well I actually noticed a press release a few days ago
saying that the latest version (4.0.10??) is
supporting sub-slelect... please check the website.

this following should be working:

select nome from categorias, categoriamembro 
where categoriamembro.id_categoria = 
categorias.categoria and 
categoriamembro.membro = 1807;


 (select id_categoria
 from categoriamembro where id_membro=1807)
--- [EMAIL PROTECTED] wrote:
 
 Sadly MySQL does not support sub-selects yet. Take a
 look at the manual for
 suggestions of ways around it.
 
 Keith
 
 
 
 
 Extranet
 [EMAIL PROTECTED] - 06/02/2003 02:31
 
 To:mysql
 
 cc:
 
 
 Subject:Can mysql execute this ? how can i do
 this ?
 
 
 Is this possible
 
 select nome from categorias  where id_categoria in
 (select id_categoria
 from categoriamembro where id_membro=1807)
 
 in MySQL
 
 
 Thks
 
 [MsR]
 
 

-
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list
 archive)
 
 To request this thread, e-mail
 [EMAIL PROTECTED]
 To unsubscribe, e-mail

[EMAIL PROTECTED]
 Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
 
 
 
 
 
 
 
 
 This message and any attachments (the message) is
 intended solely for the addressees and is
 confidential. 
 If you receive this message in error, please delete
 it and 
 immediately notify the sender. Any use not in accord
 with 
 its purpose, any dissemination or disclosure, either
 whole 
 or partial, is prohibited except formal approval.
 The internet
 can not guarantee the integrity of this message. 
 BNP PARIBAS (and its subsidiaries) shall (will) not 
 therefore be liable for the message if modified. 
 

 -
 
 Ce message et toutes les pieces jointes (ci-apres le
 
 message) sont etablis a l'intention exclusive de
 ses 
 destinataires et sont confidentiels. Si vous recevez
 ce 
 message par erreur, merci de le detruire et d'en
 avertir 
 immediatement l'expediteur. Toute utilisation de ce 
 message non conforme a sa destination, toute
 diffusion 
 ou toute publication, totale ou partielle, est
 interdite, sauf 
 autorisation expresse. L'internet ne permettant pas 
 d'assurer l'integrite de ce message, BNP PARIBAS (et
 ses
 filiales) decline(nt) toute responsabilite au titre
 de ce 
 message, dans l'hypothese ou il aurait ete modifie.
 
 

-
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list
 archive)
 
 To request this thread, e-mail
 [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: innodb

2003-02-10 Thread Nasser Ossareh
Assuming your server supports innodb, you can use:

Alter table table_name TYPE = InnoDB;

if it failed, simply create a table with the new type,
populate it with the data in your table (with the
wrong type), drop the old table and rename the new
table.


--- [EMAIL PROTECTED] wrote:
 
 Are you running mysql or mysql-max? InnoDB is not
 supported in standard
 mysql. If you are running max then are there any
 error messages?
 
 
 
 
 Extranet
 [EMAIL PROTECTED] - 05/02/2003 17:17
 
 To:mysql
 
 cc:
 
 
 Subject:innodb
 
 
 I have a small probleme with MySQL in 3.23.55.
 I do not manage to create my tables under the format
 InnoDB by specifying
 the
 type of creation at the end of the command.
 Thank you in advance
 

-
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list
 archive)
 
 To request this thread, e-mail
 [EMAIL PROTECTED]
 To unsubscribe, e-mail

[EMAIL PROTECTED]
 Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
 
 
 
 
 
 
 
 
 This message and any attachments (the message) is
 intended solely for the addressees and is
 confidential. 
 If you receive this message in error, please delete
 it and 
 immediately notify the sender. Any use not in accord
 with 
 its purpose, any dissemination or disclosure, either
 whole 
 or partial, is prohibited except formal approval.
 The internet
 can not guarantee the integrity of this message. 
 BNP PARIBAS (and its subsidiaries) shall (will) not 
 therefore be liable for the message if modified. 
 

 -
 
 Ce message et toutes les pieces jointes (ci-apres le
 
 message) sont etablis a l'intention exclusive de
 ses 
 destinataires et sont confidentiels. Si vous recevez
 ce 
 message par erreur, merci de le detruire et d'en
 avertir 
 immediatement l'expediteur. Toute utilisation de ce 
 message non conforme a sa destination, toute
 diffusion 
 ou toute publication, totale ou partielle, est
 interdite, sauf 
 autorisation expresse. L'internet ne permettant pas 
 d'assurer l'integrite de ce message, BNP PARIBAS (et
 ses
 filiales) decline(nt) toute responsabilite au titre
 de ce 
 message, dans l'hypothese ou il aurait ete modifie.
 
 

-
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list
 archive)
 
 To request this thread, e-mail
 [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Regular Expressions

2003-02-10 Thread Nasser Ossareh
here's another example from the manual...

SELECT * FROM pet WHERE name REGEXP ^b;

see: 3.3.4.7 Pattern Matching

--- Dobromir Velev [EMAIL PROTECTED] wrote:
 Hi,
 I use it in queries like
 
 SELECT * FROM table WHERE field REGEXP patern;
 
 It is the same as using the LIKE operator wit more
 complex patterns
 
 Dobromir Velev
 [EMAIL PROTECTED]
 http://www.websitepulse.com
 
 
 
 
 - Original Message -
 From: Darren Young [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, February 06, 2003 00:02
 Subject: Regular Expressions
 
 
  I've looked through the mysql manual for
 information on regualar
  expressions, and all that it seems to have are
 references such as:
 
  SELECT fo\nfo REGEXP ^fo$;
 
  How can the REGEXP be applied to a 'SELECT field
 FROM table' kind of
  statement?
 
  Thanks,
 
  Darren Young
 
  mysql,query
 
 
 

-
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list
 archive)
 
  To request this thread, e-mail
 [EMAIL PROTECTED]
  To unsubscribe, e-mail

[EMAIL PROTECTED]
  Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
 
 
 
 

-
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list
 archive)
 
 To request this thread, e-mail
 [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL book TOC

2003-02-10 Thread Nasser Ossareh
my 2 cents:

SQL in the What is SQL? phrase threw me... I thought
you were talking about MS SQL..

If I were you, I would explain relational databases
and normalization (at list to normal form III).

Usage?? well whoever goes to buy your book, must have
some ideas in head for the usage.. I don't think you
should waste trees on telling people things that don't
help them.

One Question: What makes this book different from the
MySQL manual?

Another Question: Who is your intended audience?

A suggestion: Think of substantial examples

How about performance? and Performance tuning?

Good luck

--- Vikram Vaswani [EMAIL PROTECTED] wrote:
 Hello all,
 
 My name is Vikram Vaswani, and I'm currently working
 on the outline for a
 MySQL reference book. This is supposed to be a
 comprehensive reference to
 MySQL 4, covering all aspects of the software,
 including the new
 transaction/subquery features.
 
 I have put together a draft table of contents (TOC),
 but am a little
 hesitant about some aspects of it. I have a nagging
 feeling that I'm
 missing out on a lot of things here, and also that
 it might bs structured
 better. Specifically, I was hoping that this list
 would help me in
 evaluating the structure and content of Section 2
 below. 
 
 Since I'm not that experienced with MySQL, I thought
 I'd open this up to
 the list and see if you guys could help me figure
 out what's bugging me :)
 I'd appreciate as much feedback as possible, since
 my aim here is to
 produce something that would hopefully be useful to
 you in your usage of
 MySQL (and also stand out from the crowd of other
 MySQL books in the market)
 
 Thanks! I look forward to hearing back.
 
 Vikram Vaswani
 
 --
 TOC
 
 Section 1: Installation
 
 1.Introduction to MySQL   
 What is MySQL?
 History
 Features
 Future development
 
 2. Installing
 Linux
 Windows
 
 Section 2: Usage
 
 3.Introduction to Databases and SQL 
 What is SQL?
 SQL variants
 SQL features
 SQL syntax
 A sample SQL session
 
 4.MySQL Data Types
 Basic data types
   String and string variants
   Integer and integer variants
   Date and time types
   Boolean types
   Null type
 Advanced data types
   Enum (choice) type
   Binary object type
 
 
 5.MySQL Syntax (Working With Databases) - CREATE,
 DROP, SHOW
 Understanding how databases are stored on the file
 system
 Creating a database
 Viewing available databases
 Deleting a database
 
 Do I need to add info on the InnoDB/Berkelet/MyISAM
 types here? And
 how/when to select each?
 
 6.MySQL Syntax (Working With Tables) - DESCRIBE,
 SELECT, INSERT, UPDATE,
 DELETE, APPEND, joins
 Understanding how tables are stored on the file
 system 
 MySQL table types
 Creating a table
 Viewing available tables
 Creating table columns
 Inserting records
 Viewing table records
 Editing (updating) table records
 Joining tables
 Erasing records
 Altering columns
 Erasing columns
 Erasing tables
 
 What have I missed here?
 
 7.MySQL Syntax (Working With Tables - Advanced) -
 Indices, transactions and
 sub-queries 
 Advanced joins
 Sub-queries 
 Indices
 Transactions
 Stored procedures
 
 Do you think I need a separate chapter for each of
 the above?
 
 What have I missed here?
 
 Section 3: Administration
 
 Section 4: Development
 --
 --
 Luke: I don't believe it!
 Yoda: That, is why you fail.
   --Star Wars: The Empire Strikes Back
 

-
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list
 archive)
 
 To request this thread, e-mail
 [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Deleting a database in Mysql

2003-02-10 Thread Nasser Ossareh
drop database_name;

make sure no ones is using the database_name.
 
--- Calvin Lam [EMAIL PROTECTED] wrote:
 Hi,
 
 I am a newbie with this and I need help with Mysql
 
 How can I delete a database in Mysql
 
 thanks!
 

-
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list
 archive)
 
 To request this thread, e-mail
 [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: order by problem

2003-02-10 Thread Nasser Ossareh
assuming you have a table with two columns id and town
then here's one solution:

 Create temporary table address (ad varchar(30));
 Insert into address select concat(id, ' ', town)
from your_original_table_name;
 select * from address order by ad;


--- Nicolas JOURDEN [EMAIL PROTECTED]
wrote:
 Hi,
 
 How can I fix an order by using numbers and letters
 ?
 
 Id Town
 56 Paris 1
 60 Paris 10
 7 Paris 11
 262 Paris 12
 8 Paris 13
 16 Paris 14
 22 Paris 15
 6 Paris 3
 57 Paris 4
 51 Paris 6
 5 Paris 7
 61 Paris 8
 59 Paris 9
 
 I'd like to get :
 
 56 Paris 1
 6 Paris 3
 57 Paris 4
 51 Paris 6
 5 Paris 7
 61 Paris 8
 59 Paris 9
 60 Paris 10
 7 Paris 11
 262 Paris 12
 8 Paris 13
 16 Paris 14
 22 Paris 15
 
 A this time I'm doing this sql syntax :
 
 SELECT *
 FROM town
 ORDER BY town ASC
 
 
 How can I do it ?
 
 
 

-
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list
 archive)
 
 To request this thread, e-mail
 [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
 


__
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Opposite selection...

2003-02-05 Thread Nasser Ossareh

refer to 1.7.4.1 Subselects in the manual for the
answer.  here's a brief example:

The queries: 

SELECT * FROM table1 WHERE id NOT IN (SELECT id FROM
table2);
SELECT * FROM table1 WHERE NOT EXISTS (SELECT id FROM
table2 WHERE table1.id=table2.id);

Can be rewritten as: 

SELECT table1.* FROM table1 LEFT JOIN table2 ON
table1.id=table2.id WHERE table2.id IS NULL;




--- Nicholas Stuart [EMAIL PROTECTED] wrote:
 Ok I'm stumped on what I think should be a somewhat
 simple query. What I
 have so far is a list of names that is in a list of
 projects AND in a the
 main contact list by doing the following query:
 SELECT p.name, p.company FROM contacts c, projects p
 WHERE
 CONCAT(c.firstName,  , c.lastName) = p.name AND
 c.company = p.company
 
 This is good and works correctly, what I need now is
 the opposite of this.
 The names that are in the project list but NOT in
 the contact list. If I
 had some subqueries this would be a simple NOT IN :)
 but as I dont (mysql
 3.23.55) I'm not sure how to attack this.
 
 Thanks for any pointers/advice.
 -Nick
 
 
 

-
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list
 archive)
 
 To request this thread, e-mail
 [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Are you willing to help?

2003-02-02 Thread Nasser Ossareh
Folks

I have written a C# GUI for MySQL server which works
pretty nicely on my rather limited LAN at home.  the
purpose of this project is to make the source code
available to other folks who are in the learning
process and might want to see some code examples.

Before uploading the code or the program to MySQL
site, I would like to test it to ensure that it is
working on with a variety of configurations.  As I
indicated above, my resouces are limit to a WinXP and
a SuSe linux box. 

Is there any one on this list who might have a bit of
time, a different configuration and the willingness to
help running a few tests?  Mind you, you won't get
paid but your name will go out with the source code.

Ideally, you should have a mysql server running on
your network somewhere (any version should be okay. I
have tested 3.23.49 and 4.0.9 on linux) and a Windows
XP or Win2K (with .Net framework installed) for the
client.  Client is using ODBC.NET.  At this stage I am
not sure if you need to install ODBC.NET on your
system.  It is likely that the related libraries will
be packaged in the client's assemblies... 

The other nice thing to have is a large database... My
databases are experimental therefore pretty small.  So
I have no idea how good it the performance!! 

Thanks in Advance
Nasser. 

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL error

2003-02-02 Thread Nasser Ossareh
Create a symlink for mysqld.sock in /tmp.

ln -s /path/to/your/mysql.sock /tmp

This should resolve the problem in over 90% of the
cases.

once this is fixed it is likely that you have other
problems. but we'll discuss them when we get there ;-)



--- Mike [EMAIL PROTECTED] wrote:
 
  
 
 
 Hi All
 
 Running FreeBSD 4.7 MySQL 3.23. When trying to run
 or start MySQL I get
 
 030201 16:32:59  Can't start server : Bind on unix
 socket: Permission
 denied 030201 16:32:59  Do you already have another
 mysqld server
 running on socket: /tmp/mysql.sock ? 030201 16:32:59
  Aborting
 
 030201 16:32:59  /usr/local/libexec/mysqld: Shutdown
 Complete
 
 030201 16:32:59  mysqld ended
 
 I have removed and reinstalled Mysql, checked
 permissions, made sure
 nothing else is running on that port tried
 safe_mysqld and still got the
 same error.
 
 Any hints would be great!
 
 
 SQL DATABASE
 
 Mike Benzel [EMAIL PROTECTED] for NT
 Linux-Palm-CASL Support Cross
 Platform Messaging and TDataSet Components:
 TAstaPDADataSets Servers
 (Win32,Linux,Java) Clients
 (Win32,Linux,Java,Palm,WinCE,Linux PDA's)
 ASTA Technology Group http://www.astatech.com 
 ASTAWireless
 http://www.astawireless.com
 
 

-
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list
 archive)
 
 To request this thread, e-mail
 [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Re: last_insert_id() returns 0 in windows

2003-02-02 Thread Nasser Ossareh
Could it be that the table types are different?

the innodb table types seem to ignore auto_increment
while MyISAM are more accommodating...  so it might be
that your table on Linux is MyISAM type while the
table on XP is Innodb type.




--- Alan [EMAIL PROTECTED] wrote:
 Okay, I've seen just about every question on
 last_insert_id(), except this
 one:
 
 I am running MySQL on Win XP and when I generate a
 test table (test) with an
 AUTO_INCREMENT column (aid) and a second column (a)
 then use an insert
 statement like: INSERT INTO test (a) values (1);
 then: SELECT
 LAST_INSERT_ID(); I get a return value of 0.  I
 considered the fact that
 maybe my connection is closing, but when I create
 the same table on a remote
 Linux server it returns the proper AUTO_INCREMENT
 ID.  Is there a server
 variable I need to set or something that I should be
 looking for in order to
 make this work on Windows?
 
 Al Kearns, Sales Representative/WebMaster, MCP
 [EMAIL PROTECTED]
 1-866-858-9200
 
 

-
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list
 archive)
 
 To request this thread, e-mail
 [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: setting auto increment start value

2003-02-01 Thread Nasser Ossareh
This actually is more tricky than it sounds.  

Firstly the table already exists.  So create table is
an option only if you were going to recreate a new
table with an auto_increment column, then move the
rest of the data (except for the index column) in to
the new table, drop the old table and re-name the new
table.

a shorter approach maybe to drop the column and add a
new auto_increment column with auto_increment of 1000
or whatever you like. 

and secondly SET INSERT_ID works for values greater
than LAST_INSERT_ID as expect but for values less than
LAST_INSERT_ID (e.g. gaps created by delete command)
only works for the next generated value.  

for instance if LAST_INSERT_ID is 7 and you delete the
last 5 records... then

SET INSERT_ID = 3;
INSERT INTO table values (null, ..), (null, ..);

will result in:

1
4  // first inserted record
8  // second inserted record -- id is 8 not 5!

but

SET INSERT_ID = 60;
INSERT INTO table values (null, ..), (null, ..);

will result in

1
61  // first inserted record after set
62  // second inserted record -- follows the first

The logic of AUTO_INCREMET is consistent but its
realization is somewhat unexpected at the beginning.




--- Sherzod Ruzmetov [EMAIL PROTECTED] wrote:
 : Am Donnerstag, 30. Januar 2003 20:15 schrieb
 Mike Doanh Tran:
 :  Hi all,
 : 
 :  I am creating a new table with an
 auto_increment primary key.
 :  How do i tell mysql to start incrementing at
 a certain 
 : value, let say
 :  1000 instead of 1?
 : 
 :  Thanks,
 : 
 :  MT
 : 
 : SET INSERT_ID=1000 does it.
 
 
 Tabels have AUTO_INCREMENT option, which you will
 need to set while
 creating the table. In the following example id will
 start with 1000:
 
 CREATE TABLE test (
   id INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
 ) AUTO_INCREMENT=1000;
 
 Good luck
 
 Sherzod
 
 
 
 
 

-
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list
 archive)
 
 To request this thread, e-mail
 [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Autoincrement : how does it work / how to reset it

2003-02-01 Thread Nasser Ossareh
Auto_Increment will increment the last_INSERT_ID
(which in your case is 10)... so the num field of the
new entry will be 11.


--- Robert Mena [EMAIL PROTECTED] wrote:
 Hi, I have been using autoincrement fields for some
 time but was wondering how does it work in some
 special situations.
 
 Ex. suppose I have an autoincrement field called num
 and the last one has value of 10.
 
 I delete the last on and insert a new one.  Which
 value will it have ? 10 or 11
 
 I read that if I issue a query delete * from table
 and
 delete from table I have diferent results (in
 regards
 to the auto increment field). Is this correct ?
 
 Thanks.
 PS. plese CC me directly since for some reason the
 messages from the list are taking a while to get in
 my mailbox.
 
 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up
 now.
 http://mailplus.yahoo.com
 

-
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list
 archive)
 
 To request this thread, e-mail
 [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re:count in subselect problem

2003-01-25 Thread Nasser Ossareh
Well it all depends which version of mysql you are using... versions prior to 4 don't 
support sub-select..



-- Stijn Van Rompaey [EMAIL PROTECTED] writes:

Return-Path: [EMAIL PROTECTED]
Received: from mx11.nyc.untd.com (mx11.nyc.untd.com [10.140.24.71])
by maildeliver03.nyc.untd.com with SMTP id AAA9DDMXAABM9SBJ
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Fri, 24 Jan 2003 16:22:40 -0500 (EST)
Received: from web.mysql.com (web.mysql.com [213.136.49.183])
by mx11.nyc.untd.com with SMTP id AAA9DDMW9AUWDGJA
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Fri, 24 Jan 2003 16:22:39 -0500 (EST)
Received: (qmail 27937 invoked by uid 7797); 24 Jan 2003 15:18:00 -
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm (http://www.ezmlm.org)
List-ID: mysql.mysql.com
Precedence: bulk
List-Help: mailto:[EMAIL PROTECTED]
List-Unsubscribe: mailto:[EMAIL PROTECTED]
List-Post: mailto:[EMAIL PROTECTED]
List-Subscribe: mailto:[EMAIL PROTECTED]
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 27923 invoked from network); 24 Jan 2003 15:18:00 -
Message-ID: 00b601c2c3bb$cae633a0$c031e0d5@testrk98
From: Stijn Van Rompaey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: count in subselect problem
Date: Fri, 24 Jan 2003 16:18:04 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.


1st problem:

SELECT F.id,
  F.title,
 F.description,
F.created,
(select count(*) from forum F, topic T where F.id=T.forum_id AND
T.reply_id=0 ) count1,
(select count(*) from forum F, topic T where F.id=T.forum_id  )
count2
from forum F, topic T where F.id=T.forum_id AND T.reply_id=0
GROUP BY F.id




2nd problem:

SELECT T.title,
T.id,
P.nick,
(select count(*) from topic where reply_id = T.reply_id)
replies
 FROM topic T, profile P WHERE T.author_id=P.id AND T.forum_id=1 and
reply_id=0;



what is wrong with these queries?


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php






-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re:ODBC Driver?

2003-01-24 Thread Nasser Ossareh
you can get all you need from here.

http://www.mysql.com/articles/dotnet/index.html


-- Jeffrey Powell [EMAIL PROTECTED] writes:

Return-Path: [EMAIL PROTECTED]
Received: from mx06.lax.untd.com (mx06.lax.untd.com [10.130.24.66])
by maildeliver04.nyc.untd.com with SMTP id AAA9DBTT3AFWQBTA
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Thu, 23 Jan 2003 23:51:05 -0500 (EST)
Received: from web.mysql.com (web.mysql.com [213.136.49.183])
by mx06.lax.untd.com with SMTP id AAA9DBTT2ATKMRW2
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Thu, 23 Jan 2003 20:51:04 -0800 (PST)
Received: (qmail 27781 invoked by uid 7797); 23 Jan 2003 23:29:54 -
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm (http://www.ezmlm.org)
List-ID: mysql.mysql.com
Precedence: bulk
List-Help: mailto:[EMAIL PROTECTED]
List-Unsubscribe: mailto:[EMAIL PROTECTED]
List-Post: mailto:[EMAIL PROTECTED]
List-Subscribe: mailto:[EMAIL PROTECTED]
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 27763 invoked from network); 23 Jan 2003 23:29:53 -
Content-Type: text/plain;
  charset=us-ascii
From: Jeffrey Powell [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
Organization: Yonezawa English School
To: [EMAIL PROTECTED]
Subject: ODBC Driver?
Date: Fri, 24 Jan 2003 08:29:35 +0900
User-Agent: KMail/1.4.3
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: [EMAIL PROTECTED]

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I am preparing to migrate a client from using a large MS-ACCESS database to 
using a linux hosted MySql as the datasource. Or at least I'd like to be able 
to export tables as a backup.

Please tell me where I can get a driver.

Thanks,
- -- 
Jeff Powell
[EMAIL PROTECTED]
http://www.yonezawa-english-school.com
http://www.yonezawa-english-school.com/powell
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+MHrobJk3zHBW5lARAhyFAKDQ/bsoPm04VQVsq43+EpZNKb/DrwCeMmjO
B8Sf38yWG3Lb+ex3Rdoy1Rs=
=DajP
-END PGP SIGNATURE-


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php






-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re:Re: Is this possible?

2003-01-24 Thread Nasser Ossareh
I thought sub-select is a 4.x feature..



-- Frank Peavy [EMAIL PROTECTED] writes:

Return-Path: [EMAIL PROTECTED]
Received: from mx6.nyc.untd.com (mx6.nyc.untd.com [10.140.24.66])
by maildeliver03.nyc.untd.com with SMTP id AAA9DBZJZAVXT492
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Fri, 24 Jan 2003 01:28:39 -0500 (EST)
Received: from web.mysql.com (web.mysql.com [213.136.49.183])
by mx6.nyc.untd.com with SMTP id AAA9DBZJZAEVS6MS
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Fri, 24 Jan 2003 01:28:39 -0500 (EST)
Received: (qmail 15275 invoked by uid 7797); 24 Jan 2003 00:25:19 -
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm (http://www.ezmlm.org)
List-ID: mysql.mysql.com
Precedence: bulk
List-Help: mailto:[EMAIL PROTECTED]
List-Unsubscribe: mailto:[EMAIL PROTECTED]
List-Post: mailto:[EMAIL PROTECTED]
List-Subscribe: mailto:[EMAIL PROTECTED]
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 15255 invoked from network); 24 Jan 2003 00:25:18 -
Message-Id: [EMAIL PROTECTED]
X-Sender: [EMAIL PROTECTED]
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Thu, 23 Jan 2003 16:24:11 -0800
To: Doug Coning [EMAIL PROTECTED], [EMAIL PROTECTED]
From: Frank Peavy [EMAIL PROTECTED]
Subject: Re: Is this possible?
In-Reply-To: 023f01c2c313$5a2feb40$0a01a8c0@GIDEON
References: [EMAIL PROTECTED]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed

I believe a sub-select with the DISTINCT command would do it.
You would have to look up the syntax.

Also, it seems that some people seem to be having a problem with 
sub-selects but
I don't have any direct experience to convey.


At 01:12 PM 1/23/03 -0600, Doug Coning wrote:
Is this possible in MySQL without using a temporary table with multiple SQL
commands:

I am trying to SELECT the results of multiple columns into 1 column or
Alias,
group them and sort them.

So if I had a table with 4 fields: Cat1, Cat2, Cat3,  Cat4 like such:

+-+--+-+--+
| Cat1| Cat2 | Cat3| Cat4 |
+-+--+-+--+
|  F |   A   | |   A   |
|  D |   C   |   H   |   A   |
|  G | | | |
|  F  |   B   |   I |   A   |
+-+--+-+--+

It would select all the values, merge them into 1 column, group them, and
sort them like such so that the result would be a single column, returning
only 1 instance of each returned value:

++
| Result |
++
| A |
| B |
| C |
| D |
| F |
| G |
| H |
|  I |
++

Is there as singe Select command that can do this?  Right now I am using a
temporary table where I first clear out the values, then copy each column
one at a time over into the tables...  It works, however, I was wondering if
there is an easier way to get the single column result with all the merged
information without having to use a temporary table...

Thanks,

Doug Coning





-
Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php






-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re:Re: Is it normal?

2003-01-24 Thread Nasser Ossareh
use double with specific precision like

create table b (id double (5, 3));

then:

insert into b values (1.123, 3.14);

and then

select * from b where id  1.123;
shows only one record (3.14).

select * from b where id  1.123;
empty set.

select * from b where id = 1.123;
returns a result table with one record 1.123.

 

-- Octavian Rasnita [EMAIL PROTECTED] writes:

Return-Path: [EMAIL PROTECTED]
Received: from mx09.lax.untd.com (mx09.lax.untd.com [10.130.24.69])
by maildeliver04.nyc.untd.com with SMTP id AAA9DCAFXAKM8WJA
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Fri, 24 Jan 2003 04:00:37 -0500 (EST)
Received: from web.mysql.com (web.mysql.com [213.136.49.183])
by mx09.lax.untd.com with SMTP id AAA9DCAFWAP7ZG5J
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Fri, 24 Jan 2003 01:00:36 -0800 (PST)
Received: (qmail 11889 invoked by uid 7797); 24 Jan 2003 04:49:19 -
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm (http://www.ezmlm.org)
List-ID: mysql.mysql.com
Precedence: bulk
List-Help: mailto:[EMAIL PROTECTED]
List-Unsubscribe: mailto:[EMAIL PROTECTED]
List-Post: mailto:[EMAIL PROTECTED]
List-Subscribe: mailto:[EMAIL PROTECTED]
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 11871 invoked from network); 24 Jan 2003 04:49:19 -
Message-ID: 002901c2c364$59877270$[EMAIL PROTECTED]
From: Octavian Rasnita [EMAIL PROTECTED]
To: Stefan Hinz, iConnect \(Berlin\) [EMAIL PROTECTED],
MySQL [EMAIL PROTECTED]
References: 006101c2c09a$9c0f7330$[EMAIL PROTECTED] 
01e601c2c0ce$1a5cf1d0$dc4fc7d9@mephisto
Subject: Re: Is it normal?
Date: Thu, 23 Jan 2003 22:13:07 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.

And does anyone know what column type I should use if I want a precise
calculation?
I've even tried with text and blob, but they are not working either.
Only the int type is precise?

Thanks.

Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]

- Original Message -
From: Stefan Hinz, iConnect (Berlin) [EMAIL PROTECTED]
To: Octavian Rasnita [EMAIL PROTECTED]; MySQL [EMAIL PROTECTED]
Sent: Monday, January 20, 2003 11:42 PM
Subject: Re: Is it normal?


Octavian,

 mysql create table test(id float);
 mysql insert into test values(1.123), (3.1495);
 mysql select * from test where id=1.123;
 Empty set (0.00 sec)
 Shouldn't this last query show me the record that has the id=1.123?

Well ... 1.123 is greater than 1.123, see:

mysql select id from octavian where id  1.123;
++
| id |
++
|  1.123 |
| 3.1495 |
++
2 rows in set (0.00 sec)

Now here's why. Floats are simply not precise:

mysql select id*1 from octavian where id  1.123;
+-+
| id*1|
+-+
| 11230.000257492 | --
| 31494.998931885 |
+-+
2 rows in set (0.00 sec)

 What query should I use to do this?

I leave this one to Paul or one of the other gurus.

Regards,
--
  Stefan Hinz [EMAIL PROTECTED]
  Gesch䦴sf��r / CEO iConnect GmbH http://iConnect.de
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: Octavian Rasnita [EMAIL PROTECTED]
To: MySQL [EMAIL PROTECTED]
Sent: Monday, January 20, 2003 9:34 AM
Subject: Is it normal?


 Hi all,

 I've tried the following SQL queries:

 mysql create table test(id float);
 Query OK, 0 rows affected (0.00 sec)

 mysql insert into test values(1.123), (3.1495);
 Query OK, 2 rows affected (0.01 sec)
 Records: 2  Duplicates: 0  Warnings: 0

 mysql select * from test where id=1.123;
 Empty set (0.00 sec)

 Shouldn't this last query show me the record that has the id=1.123?

 What query should I use to do this?

 Thank you.



 Teddy,
 Teddy's Center: http://teddy.fcc.ro/
 Email: [EMAIL PROTECTED]



 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php





-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php






-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 

Re:mysql: field type of double without scientific notation

2003-01-22 Thread Nasser Ossareh
You probably have created your table without specifying the format of the double... 
the following statement would be more appropriate to your expectation:

mysql create table testTable (id int, val double(12, 9));

this will set the display width of the double to 12 and the number of digits following 
the decimal point to 9.

You can ALTER the column definition to avoid re-entring the data.. 

-Nasser

-- Philipp Sutter [EMAIL PROTECTED] writes:

Return-Path: [EMAIL PROTECTED]
Received: from mx05.lax.untd.com (mx05.lax.untd.com [10.130.24.65])
by maildeliver03.nyc.untd.com with SMTP id AAA9C4WJSAMUQ6QJ
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Tue, 21 Jan 2003 08:54:24 -0500 (EST)
Received: from web.mysql.com (web.mysql.com [213.136.49.183])
by mx05.lax.untd.com with SMTP id AAA9C4WJRAQCPDZJ
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Tue, 21 Jan 2003 05:54:23 -0800 (PST)
Received: (qmail 19865 invoked by uid 7797); 21 Jan 2003 13:36:40 -
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm (http://www.ezmlm.org)
List-ID: mysql.mysql.com
Precedence: bulk
List-Help: mailto:[EMAIL PROTECTED]
List-Unsubscribe: mailto:[EMAIL PROTECTED]
List-Post: mailto:[EMAIL PROTECTED]
List-Subscribe: mailto:[EMAIL PROTECTED]
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 19846 invoked from network); 21 Jan 2003 13:36:40 -
Subject: mysql: field type of double without scientific notation
From: Philipp Sutter [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
In-Reply-To: [EMAIL PROTECTED]
References: [EMAIL PROTECTED]
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Ximian Evolution 1.0.8 
Date: 21 Jan 2003 16:40:53 +0100
Message-Id: 1043163653.3899.7.camel@sutter
Mime-Version: 1.0


I have a Mysql-table with a field of type double. when i retrieve very small
numbers from this table I get them allways in a scientific notation:
i.e. 8.34e-05. what i have to do, that i get the same number in normal
notation: 0.834?

thank you for any hints in advance!

philipp






-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php






-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re:Trying to update data in a table - getting an error

2003-01-22 Thread Nasser Ossareh

try 'substring' instead of 'substr'.


-- Don [EMAIL PROTECTED] writes:

Return-Path: [EMAIL PROTECTED]
Received: from mx11.lax.untd.com (mx11.lax.untd.com [10.130.24.71])
by maildeliver04.nyc.untd.com with SMTP id AAA9C453SATSGSQA
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Tue, 21 Jan 2003 11:02:56 -0500 (EST)
Received: from web.mysql.com (web.mysql.com [213.136.49.183])
by mx11.lax.untd.com with SMTP id AAA9C453RAZK776S
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Tue, 21 Jan 2003 08:02:55 -0800 (PST)
Received: (qmail 3943 invoked by uid 7797); 21 Jan 2003 15:35:06 -
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm (http://www.ezmlm.org)
List-ID: mysql.mysql.com
Precedence: bulk
List-Help: mailto:[EMAIL PROTECTED]
List-Unsubscribe: mailto:[EMAIL PROTECTED]
List-Post: mailto:[EMAIL PROTECTED]
List-Subscribe: mailto:[EMAIL PROTECTED]
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 3784 invoked from network); 21 Jan 2003 15:34:55 -
Message-ID: 008001c2c162$96e4fba0$c889cdcd@enterprise
From: Don [EMAIL PROTECTED]
To: msql list [EMAIL PROTECTED]
Subject:  Trying to update data in a table - getting an error
Date: Tue, 21 Jan 2003 10:34:20 -0500
MIME-Version: 1.0
Content-Type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

Hi,
RESENT DFUE TO TYPO

I want to change a field in a table.  Currently the data is in theformat --
4818.50.00
I want to remove the decimal points so that it is like -- 48185000
I tried the sql code below but am getting a syntax error.  Can someone
please point out the error of my ways?

UPDATE DocComms SET ItemHSCode = concat(substr( ItemHSCode, 1, 4 ),
substr( ItemHSCode, 6, 2 ), substr( ItemHSCode, 9, 2 ))

Thanks,
Don


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php






-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re:Admin login problem

2003-01-20 Thread Nasser Ossareh
Shutdown you mysqld sever and restart it with

 mysqld -u root -Sg 

then grant all privileges to root, make sure that your root password is okay. Make 
sure that there is an entry in mysql.user table for root@localhost.  Then, restart 
your server and see how it goes...

Nasser.

-- [EMAIL PROTECTED] writes:

Return-Path: [EMAIL PROTECTED]
Received: from mx10.lax.untd.com (mx10.lax.untd.com [10.130.24.70])
by maildeliver03.nyc.untd.com with SMTP id AAA9CZUA4ACZSBUA
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Mon, 20 Jan 2003 04:57:46 -0500 (EST)
Received: from web.mysql.com (web.mysql.com [213.136.49.183])
by mx10.lax.untd.com with SMTP id AAA9CZUA3AGYWQBJ
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Mon, 20 Jan 2003 01:57:45 -0800 (PST)
Received: (qmail 30161 invoked by uid 7797); 20 Jan 2003 09:38:01 -
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm (http://www.ezmlm.org)
List-ID: mysql.mysql.com
Precedence: bulk
List-Help: mailto:[EMAIL PROTECTED]
List-Unsubscribe: mailto:[EMAIL PROTECTED]
List-Post: mailto:[EMAIL PROTECTED]
List-Subscribe: mailto:[EMAIL PROTECTED]
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 29996 invoked from network); 20 Jan 2003 09:37:51 -
To: [EMAIL PROTECTED]
Subject: Admin login problem
Message-ID: [EMAIL PROTECTED]
Date: Mon, 20 Jan 2003 10:37:51 +0100 (CET)
From: [EMAIL PROTECTED]
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 8bit
User-Agent: IMP/PHP IMAP webmail program 2.2.3
X-Originating-IP: 193.2.236.15

When I type bin/mysqladmin -u root password mypass (or without password, 
because I didn't set it) then I get Access denied for user: 'root@localhost' 
(Using password: NO) I need help ?? 

Thank you.

---
http://www.email.si

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php






-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re:Re: Substraction

2003-01-20 Thread Nasser Ossareh
 1. Check if you really need an unsigned column  - if not just alter the column to 
signed

this is the most appropriate answer.  i.e your table design should cater for the 
limited set or modulus arithmatics.  

Casting wouldn't work simply because you may really want the actual unsigned value of 
2^64 - 5 which is 18446744073709551611 in one case and the 5 - 10 = -5 in another.  If 
you cast both, it will return -5 (not a pleasant view for a very rich bank 
customer!!). 

And by the way this is not a MySQL limitation, it is a computer Science issue as 
computers can not implement infinite sets (N, R, Z, Q etc).  

Luckily, this doesn't happen in practice because database designers do allow for such 
issues in their table designs... Octavian's table is, however designed to show this 
issue and not to solve a commerical problem.

Enough is enough! Let's stop this nonsense.

Nasser.

-- Dobromir Velev [EMAIL PROTECTED] writes:

Return-Path: [EMAIL PROTECTED]
Received: from mx12.lax.untd.com (mx12.lax.untd.com [10.130.24.72])
by maildeliver03.nyc.untd.com with SMTP id AAA9C2PGCAFYS4JA
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Mon, 20 Jan 2003 12:41:22 -0500 (EST)
Received: from web.mysql.com (web.mysql.com [213.136.49.183])
by mx12.lax.untd.com with SMTP id AAA9C2PGBAM2YKK2
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Mon, 20 Jan 2003 09:41:21 -0800 (PST)
Received: (qmail 30395 invoked by uid 7797); 20 Jan 2003 17:12:03 -
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm (http://www.ezmlm.org)
List-ID: mysql.mysql.com
Precedence: bulk
List-Help: mailto:[EMAIL PROTECTED]
List-Unsubscribe: mailto:[EMAIL PROTECTED]
List-Post: mailto:[EMAIL PROTECTED]
List-Subscribe: mailto:[EMAIL PROTECTED]
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 30024 invoked from network); 20 Jan 2003 17:11:38 -
Message-ID: 05b801c2c0a7$8c882800$1d00a8c0@Dobromir
From: Dobromir Velev [EMAIL PROTECTED]
To: Octavian Rasnita [EMAIL PROTECTED]
Cc: MySQL [EMAIL PROTECTED]
References: 001901c2bfe4$58e8dda0$[EMAIL PROTECTED] 
[EMAIL PROTECTED] 
00ad01c2c010$45ee73a0$dc4fc7d9@mephisto 
006001c2c09a$9a4fc1d0$[EMAIL PROTECTED]
Subject: Re: Substraction
Date: Mon, 20 Jan 2003 19:15:33 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.
X-Virus-Scanned: by AMaViS perl-11

Hi,
There are several ways to solve the problem -
1. Check if you really need an unsigned column  - if not just alter the
column to signed
2. A simple workaround for substracting unsigned values is to add a floating
point number to the operation - then all values will be converted to float
and the negative value will be displayed. For example this should give you
what you need

select 15.0 - id from test;

3. Use CAST function. Example:

select cast(15-id as signed) from test;

HTH
Dobromir Velev
[EMAIL PROTECTED]



- Original Message -
From: Octavian Rasnita [EMAIL PROTECTED]
To: Stefan Hinz, iConnect (Berlin) [EMAIL PROTECTED]; Brian
Lindner [EMAIL PROTECTED]
Cc: MySQL [EMAIL PROTECTED]
Sent: Monday, January 20, 2003 08:22
Subject: Re: Substraction


 But I don't want to perform a 15 - id, meaning 15 - 10.
 I want to calculate 5 - id, meaning 5 - 10.

 It should give me -5 or 5 but not | 18446744073709551611 |


 Teddy,
 Teddy's Center: http://teddy.fcc.ro/
 Email: [EMAIL PROTECTED]

 - Original Message -
 From: Stefan Hinz, iConnect (Berlin) [EMAIL PROTECTED]
 To: Brian Lindner [EMAIL PROTECTED]; Octavian Rasnita
 [EMAIL PROTECTED]
 Cc: MySQL [EMAIL PROTECTED]
 Sent: Monday, January 20, 2003 1:09 AM
 Subject: Re: Substraction


 Brian,

   create table test(id int unsigned);
   insert into test values(10);
   select 15 - id from test;
   The result is 18446744073709551611 instead of -5.

 Trying to confirm this with MySQL 4.0.7 on a Win2K box:

 mysql create table test(id int unsigned);
 Query OK, 0 rows affected (0.56 sec)

 mysql insert into test values(10);
 Query OK, 1 row affected (0.08 sec)

 mysql select 15 - id from test;
 +-+
 | 15 - id |
 +-+
 |   5 |
 +-+
 1 row in set (0.06 sec)

 Now, once again with phpMyAdmin 2.3.3pl1:

 SELECT 15 - id
 FROM test LIMIT 0, 30
 15 - id
 5

 But with the following statement (same with phpMyAdmin):

 mysql select 5 - id from test;
 +--+
 | 5 - id   |
 +--+
 | 18446744073709551611 |
 +--+
 1 row in set (0.00 sec)

 Check the 1 in your 15. Maybe there's something wrong.

 Regards,
 --
   Stefan Hinz [EMAIL PROTECTED]
   Gesch䦴sf��r / CEO iConnect GmbH http://iConnect.de
   Heesestr. 6, 12169 Berlin (Germany)
   Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

 - Original Message -
 From: Brian Lindner [EMAIL 

Re:synopsis of the problem (one line)

2003-01-19 Thread Nasser Ossareh
 telnet: Unable to connect to remote host: Connection refused

 I don't understand this problem. I've never had this problem.

This simply means that mysqld is not running on your server.  the result of the telnet 
test (i.e. Connection Refused) confirms that.  You need to start mysqld before trying 
mysqladmin.  

Nasser.
sql, smallint
-- root root@darkvador writes:

Return-Path: [EMAIL PROTECTED]
Received: from mx09.lax.untd.com (mx09.lax.untd.com [10.130.24.69])
by maildeliver05.nyc.untd.com with SMTP id AAA9CXP6DAW9MAB2
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Sun, 19 Jan 2003 09:34:43 -0500 (EST)
Received: from web.mysql.com (web.mysql.com [213.136.49.183])
by mx09.lax.untd.com with SMTP id AAA9CXP6CA29394A
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Sun, 19 Jan 2003 06:34:42 -0800 (PST)
Received: (qmail 3821 invoked by uid 7797); 19 Jan 2003 14:32:07 -
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm (http://www.ezmlm.org)
List-ID: mysql.mysql.com
Precedence: bulk
List-Help: mailto:[EMAIL PROTECTED]
List-Unsubscribe: mailto:[EMAIL PROTECTED]
List-Post: mailto:[EMAIL PROTECTED]
List-Subscribe: mailto:[EMAIL PROTECTED]
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 3807 invoked from network); 19 Jan 2003 14:32:07 -
To: [EMAIL PROTECTED]
Subject:synopsis of the problem (one line)
From: root root@darkvador
Message-Id: E18ZB5L-hO-00@darkvador
Date: Thu, 16 Jan 2003 15:33:35 +0100

Description:
I can connect on my database at localhost, but not at real hostname. Example when i 
want to change the password :

darkvador:/usr/bin# /usr/bin/mysqladmin -u root -h darkvador  password 'newpassword'
/usr/bin/mysqladmin: connect to server at 'darkvador' failed
error: 'Can't connect to MySQL server on 'darkvador' (111)'
Check that mysqld is running on darkvador and that the port is 3306.
You can check this by doing 'telnet darkvador 3306'

So, i make : telnet darkvador 3306
darkvador:/usr/bin# telnet darkvador 3306
Trying 192.168.0.1...
telnet: Unable to connect to remote host: Connection refused

I don't understand this problem. I've never had this problem.

thank you

NB : Sorry for my english !

How-To-Repeat:
allways
Fix:
no solution

Submitter-Id:  submitter ID
Originator:root
Organization:
 
MySQL support: [none | licence | email support | extended email support ]
Synopsis:  
Severity:  
Priority:  
Category:  mysql
Class: 
Release:   mysql-3.23.52 (Source distribution)

Environment:

System: Linux darkvador 2.2.17 #1 Sun Jun 25 09:24:41 EST 2000 i586 unknown
Architecture: i586

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)
Compilation info: CC='gcc'  CFLAGS=''  CXX='g++'  CXXFLAGS=''  LDFLAGS=''
LIBC: 
lrwxrwxrwx1 root root   13 jan 16 13:08 /lib/libc.so.6 - libc-2.2.5.so
-rwxr-xr-x1 root root  1145456 sep 18 04:50 /lib/libc-2.2.5.so
-rw-r--r--1 root root  2376426 sep 18 04:51 /usr/lib/libc.a
-rw-r--r--1 root root  178 sep 18 04:51 /usr/lib/libc.so
Configure command: ./configure --prefix=/usr --exec-prefix=/usr --libexecdir=/usr/sbin 
--datadir=/usr/share --sysconfdir=/etc/mysql --localstatedir=/var/lib/mysql 
--includedir=/usr/include --infodir=/usr/share/info --mandir=/usr/share/man 
--enable-shared --with-libwrap --enable-assembler --with-berkeley-db --with-innodb 
--enable-static --enable-shared --enable-local-infile --with-raid 
--enable-thread-safe-client --without-readline 
--with-unix-socket-path=/var/run/mysqld/mysqld.sock --with-mysqld-user=mysql 
--without-bench --without-docs --with-client-ldflags=-lstdc++ --with-extra-charsets=all


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php






-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re:Re: Substraction

2003-01-19 Thread Nasser Ossareh
Isn't there a typo somewhere... 
Shouldn't you expect 5 instead of -5 (15 - id where id = 10)??   

Nevermind, let's assume that there is a typo somewhere and the correct expected value 
is -5... however, in the domain of unsigned arithmetics -5 is precisely 
18446744073709551611... don't you believe me:  look at this:

18446744073709551611 + 5 = 18446744073709551616 which is 2 to power 64 (2^64). Clearly 
in the architecture that you are using an unsigned int is a 64 bits integer... if you 
set all the bits to 1 you will get the largest unsigned int in your system and that is 
18446744073709551615 which is (2^64)-1.  if you increment it by one... all the bits 
switch to 0.  Hence within your architecture 2^64 = 0 and -5 is represented correctly 
by 18446744073709551611 (which is 2^64 - 5).

Nasser
sql, smallint, ...

-- Brian Lindner [EMAIL PROTECTED] writes:

Return-Path: [EMAIL PROTECTED]
Received: from mx11.lax.untd.com (mx11.lax.untd.com [10.130.24.71])
by maildeliver03.nyc.untd.com with SMTP id AAA9CYGS4AWCVYC2
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Sun, 19 Jan 2003 16:35:22 -0500 (EST)
Received: from web.mysql.com (web.mysql.com [213.136.49.183])
by mx11.lax.untd.com with SMTP id AAA9CYGS3A42HYBJ
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Sun, 19 Jan 2003 13:35:21 -0800 (PST)
Received: (qmail 2737 invoked by uid 7797); 19 Jan 2003 21:29:14 -
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm (http://www.ezmlm.org)
List-ID: mysql.mysql.com
Precedence: bulk
List-Help: mailto:[EMAIL PROTECTED]
List-Unsubscribe: mailto:[EMAIL PROTECTED]
List-Post: mailto:[EMAIL PROTECTED]
List-Subscribe: mailto:[EMAIL PROTECTED]
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 2704 invoked from network); 19 Jan 2003 21:29:13 -
Date: Sun, 19 Jan 2003 16:28:43 -0500
From: Brian Lindner [EMAIL PROTECTED]
X-Mailer: The Bat! (v1.62 Christmas Edition) UNREG / CD5BF9353B3B7091
Reply-To: Brian Lindner [EMAIL PROTECTED]
X-Priority: 3 (Normal)
Message-ID: [EMAIL PROTECTED]
To: Octavian Rasnita [EMAIL PROTECTED]
CC: MySQL [EMAIL PROTECTED]
Subject: Re: Substraction
In-Reply-To: 001901c2bfe4$58e8dda0$[EMAIL PROTECTED]
References: 001901c2bfe4$58e8dda0$[EMAIL PROTECTED]
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Octavian,

Sunday, January 19, 2003, 7:31:57 AM, you wrote:
 Hi all,

 I've tried the following query:

 create table test(id int unsigned);
 insert into test values(10);
 select 15 - id from test;

 The result is 18446744073709551611 instead of -5.

I ran this.. and it worked for me

MySql 4.0.7 on Linux... ran it through phpMyAdmin

 Am I doing something wrong?

 Thank you.

 Teddy,
 Teddy's Center: http://teddy.fcc.ro/
 Email: [EMAIL PROTECTED]



 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php





--
 Brian
 Email: [EMAIL PROTECTED]




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php






-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re:Potential Customer - Technical Questions

2003-01-19 Thread Nasser Ossareh
re: Question 1:  

You are right that windows does not ship the ODBC provider but MS has actually created 
one and is available for free download.  You also need the MyODBC driver which is 
created by MySQL folks (also free).  Apart from these two there are a few other pieces 
of software that you need..  I have installed all of them, and guess what?  They 
actually work!!! with C#... if you are using VB6 in .NET framework, you shouldn't have 
any problem...  here's a site that will offer you all the links you need for setting 
up your system.
http://www.mysql.com/articles/dotnet/index.html
(my specs: XP-home client - MySQL 3.23.48 on linux 2.4)

re: Question 2, 3:
I have used the setup with VB6, but in theory it should work with the environment that 
you are refering to.  You really need to try it without panicing... ;-) you don't need 
a bundling program.. you just need a couple of hours free time and some patience.  

Also I haven't tested this, but my guess is that all the drivers are being packaged in 
the executable.. so you can just drop it on a new machine and run with it (but maybe I 
am day dreaming???).

re: Question 4
There should be no charge for using MySQL in a commercial product... please don't put 
new ideas in MySQL folks' heads ;-)

Nasser.
  


-- A A [EMAIL PROTECTED] writes:

Return-Path: [EMAIL PROTECTED]
Received: from mx13.nyc.untd.com (mx13.nyc.untd.com [10.140.24.73])
by maildeliver05.nyc.untd.com with SMTP id AAA9CYS52AD23NNJ
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Sun, 19 Jan 2003 19:31:52 -0500 (EST)
Received: from web.mysql.com (web.mysql.com [213.136.49.183])
by mx13.nyc.untd.com with SMTP id AAA9CYS5ZAUW2BH2
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Sun, 19 Jan 2003 19:31:51 -0500 (EST)
Received: (qmail 29592 invoked by uid 7797); 20 Jan 2003 00:29:05 -
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm (http://www.ezmlm.org)
List-ID: mysql.mysql.com
Precedence: bulk
List-Help: mailto:[EMAIL PROTECTED]
List-Unsubscribe: mailto:[EMAIL PROTECTED]
List-Post: mailto:[EMAIL PROTECTED]
List-Subscribe: mailto:[EMAIL PROTECTED]
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 29576 invoked from network); 20 Jan 2003 00:29:04 -
To: [EMAIL PROTECTED]
Date: Sun, 19 Jan 2003 16:28:27 -0800
From: A A [EMAIL PROTECTED]
Message-ID: [EMAIL PROTECTED]
Mime-Version: 1.0
X-Sent-Mail: off
Reply-To: [EMAIL PROTECTED]
X-Mailer: MailCity Service
X-Priority: 3
Subject: Potential Customer - Technical Questions
X-Sender-Ip: 209.121.214.189
Organization: Lycos Mail  (http://www.mail.lycos.com:80)
Content-Type: text/plain; charset=us-ascii
Content-Language: en
Content-Transfer-Encoding: 7bit

Hi mySQL Support,

I am a small programming company and I currently use VB6 and MS Access as my database. 
 I am currently in negotiations to develop new applications with a number of different 
companies.  I am finding the number of entries the companies desire will exceed MS 
Access to unsafe levels.  

I am interested in mySQL as my new database, but I have a few questions before I make 
my decision.

Question 1:  mySQL does not have an ODBC connection in Windows and I understand there 
is a MySQL ODBC installation program I can use for connectivity.  My question is, once 
I make an application in VB6 with mySQL as the database.  Is there a problem with 
bundling the application and installing the program on a customer’s computer?  Will 
the customer have to install and set up mySQL ODBC or is there a VB6 bundling program 
that will install VB6 and mySQL components?

Question 2:  VB6 has a Designers – DataEnvironment ability.  Which links MS Access to 
the program.  Is mySQL able to use this DataEnvironment and code primarily the same as 
MS Access does?  Once again is there a bundling problem with this?

Question 3:  Is there a bundling program that caused the least amount of problems with 
VB6 and mySQL applications?

Question 4:  What are the appropriate fees associated with purchasing mySQL as a 
programming company who would use mySQL as its database in its applications.

I hope I was clear enough to understand.  Please feel free to clarify, I won’t be 
insulted.

Yours truly,
Sam



_
Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
http://login.mail.lycos.com/brandPage.shtml?pageId=plusref=lmtplus

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php






-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   

Re:SQL Count Query

2003-01-18 Thread Nasser Ossareh
a row gets inserted into this table
whenever a visitor uses a certain tool on the site

based on this approach your table does not have any entries for the days that no one 
uses the certain tool on the site.  As a result your query can not pull out records 
which don't exist.

You could catter for this programmatically by a perl script.  The script could do this:

create a temporary table 
insert all records from your main table between TheStartDate and TheEndDate... 
iterate through TheStartDate and theEndDate and add one record per day to the 
temporary table.
The SQL statement should display count-1 for each day.

I don't have perl on my system so I can't help with the script I hope someone else can.

-Nasser.



-- Jefferey Donnici [EMAIL PROTECTED] writes:

Return-Path: [EMAIL PROTECTED]
Received: from mx13.nyc.untd.com (mx13.nyc.untd.com [10.140.24.73])
by maildeliver04.nyc.untd.com with SMTP id AAA9CV2ZWAGWKH3J
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Sat, 18 Jan 2003 18:27:48 -0500 (EST)
Received: from web.mysql.com (web.mysql.com [213.136.49.183])
by mx13.nyc.untd.com with SMTP id AAA9CV2ZVA7XH6LJ
for [EMAIL PROTECTED] (sender 
[EMAIL PROTECTED]);
Sat, 18 Jan 2003 18:27:47 -0500 (EST)
Received: (qmail 16262 invoked by uid 7797); 18 Jan 2003 23:24:32 -
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm (http://www.ezmlm.org)
List-ID: mysql.mysql.com
Precedence: bulk
List-Help: mailto:[EMAIL PROTECTED]
List-Unsubscribe: mailto:[EMAIL PROTECTED]
List-Post: mailto:[EMAIL PROTECTED]
List-Subscribe: mailto:[EMAIL PROTECTED]
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 16248 invoked from network); 18 Jan 2003 23:24:31 -
Message-ID: [EMAIL PROTECTED]
Date: Sat, 18 Jan 2003 15:24:29 -0800 (PST)
From: Jefferey Donnici [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
Subject: SQL Count Query
To: [EMAIL PROTECTED]
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

I've got a table whose structure looks like this:

CREATE TABLE IF NOT EXISTS calc_hits
 (id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
  hit_date  DATETIME NOT NULL,
  PRIMARY KEY (id))
  AUTO_INCREMENT = 1;

On a web site, a row gets inserted into this table
whenever a visitor uses a certain tool on the site.
The INSERT command looks like this:

INSERT INTO calc_hits VALUES (null, SYSDATE());

This may be anywhere from zero to hundreds of times a
day.

I'd like to have a page that displays the values in
this table in a meaningful way. I let the user choose
the date range and then I select a count() of all the
ID values and GROUP BY the date values. This works
well, except that days with ZERO hits on them don't
show up at all (nothing to group by)... here's the
query I'm using:

SELECT 
 DATE_FORMAT(hit_date, '%c/%e/%Y') hit_date, 
 COUNT(*) hit_count
FROM homepage_hits
WHERE hit_date = start_date
AND hit_date = end_date
GROUP BY date_format(hit_date, '%Y %c %e')
ORDER BY date_format(hit_date, '%Y %m %d') DESC

What I'd like is to change this so that a day that
falls in that date range, but has ZERO hits for the
day will still show up in the result set with the date
and a HIT_COUNT value of 0.

I've tried a number of different permutations of this
query, but am not having much luck. Before I go the
brute force route and handle it procedurally in my
application (which could yield several dozen
individual queries on the page), I'd like to see if
anyone can help. I appreciate any feedback/assistance
you may have.

Regards,

J Donnici


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php






-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php