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

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

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

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

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

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

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:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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