Re: Problem with 'OR' statement

2004-01-09 Thread Matt Fuller
Jess,

You should use an AND () instead of the OR. You result is everything, 
correct? When the query is doing the machinename != 'FIND_ME', the 
record(s) with machinename = 'OPEN' are being returned. Likewise, when the 
machinename != 'OPEN' is being performed, the records(s) with machinename = 
'FIND_ME' will be returned. Thus, every record is being returned. If you 
use AND the query will return your intended result, all the records where 
machinename != 'FIND_ME' AND machinename != 'OPEN'.

HTH
Matt
At 10:22 AM 1/9/2004, you wrote:
Could someone have a look at this syntax and give me some guidance what I
may be overlooking?
SELECT * from $TableName WHERE machinename != 'FIND_ME' OR machinename !=
'OPEN'
I can make the statement work individually, but when I try to  add the 'OR'
statement it fails to 'remove' the designated records from the display page.
I have tried moving the 'FIND_ME' and 'OPEN' around and still get the same
results.
Any help would be appreciated

Jess

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.558 / Virus Database: 350 - Release Date: 1/2/04
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: When does using multiple databases make sense?

2004-01-08 Thread Matt Fuller
Sorry Robert, didn't mean to send to only you.

We're developing a management program that can manage several jobs that a 
construction company is working on. We have a separate database for each 
job that is installed in the program. This eliminates the need to keep an 
extra field in each table that designates which job the record is for. We 
simply have a connection open to the appropriate database that the user is 
working with. There are times that I wonder if this was an appropriate 
design, but for the most part, I think its the most simplistic way of 
coding it.

Matt

At 11:47 AM 1/8/2004, you wrote:

In our accounting software our users can manage the books for several 
different companies with the same program. As such I have to keep a field 
(in every record) that designates which company the given record is for 
and use it for report filtering, lookups, etc. Had I used a different 
database for each company then I would not need the overhead of this 
field. We chose the company field over the multiple databases because many 
of our clients are vertically integrated and do cross charging (an entry 
from one company posts to another company). This inter-company stuff is 
easy if the data is all in one database but we always have to remember to 
filter by the company field everywhere else. If I had it to do over again 
I'd probably use multiple databases.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Problem while installing MySQL, etc.

2004-01-07 Thread Matt Fuller
Sharma and Terry,

I believe MySQL only supplies setup.exe files with the versions that have 
production status. However, if you download the appropriate .zip file from 
the website, then that will contain all the files that you need. Simply 
extract it to the default location (C:\mysql in Windows or \usr\local, I 
believe, in Linux). If you are upgrading, then make sure you back up your 
old installation as to not override your data.

HTH,
Matt
At 09:25 AM 1/7/2004, Sharma, Saurabh wrote:

Hi
 I am trying to install MySQL for practice on my PC (Windows XP). I have 
all the administrative rights
I downloaded the zip file mysql-4.1.1a-alpha.zip from the downloads.
I extracted the zip file in a temporary folder.
The manual says run setup.exe for installing on Windows but I couldn't 
find this file in the temporary folder.
Can you help me on this regard

Thanks and Regards
Saurabh Sharma
Fidelity Brokerage Technology

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
At 09:43 AM 1/7/2004, Terry Riley wrote:
I have downloaded the correct windows zip file, but unlike previous
Windows downloads, this does not include a setup.exe file, but hundreds of
other (source?) files.
Yes, I have RTFM, which merely tells me to extract to a temporary
directory the run the setup.exe file, which is non-existent.
How can I upgrade from 4.0.17, please? Or even start again from scratch
with 4.1.1?
Regards
Terry Riley
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: IDENTITY column

2003-12-23 Thread Matt Fuller
Hi,

I think what you need is an auto increment (primary key) column. When a 
record is inserted, it will automatically generate the next number in the 
sequence. Being a primary key, the column must be unique (i.e no two rows 
can be the same), so you can identify a specify record in the table. When 
you insert a record, you can run

SELECT LAST_INSERT_ID();

to retrieve the id that was used. The LAST_INSERT_ID is determined on a per 
connection basis, so you are guaranteed to get the last id that _you_ 
inserted, even if there are other users inserting records, as long as you 
do not run another INSERT.

As for 3, you should not worry about how MySQL stores the rows. You should 
specify an ORDER BY clause in your SELECT statements to get the order in 
which you want. If you want to know, MySQL stores the rows ascending (1 is 
first, 2 is second, ...). However, if a record gets deleted from the table, 
then MySQL will try to re-use the space that once held that row.

Check out the following links:
http://www.mysql.com/doc/en/CREATE_TABLE.html
http://www.mysql.com/doc/en/example-AUTO_INCREMENT.html
HTH

Matt

At 01:14 PM 12/23/2003, you wrote:
Hi, I am a beginner in using database.  And I
appreciate your support and help.
When we first create a table,

1. is it possible to create a column that identifies
each record that is to be inserted?
2. If we can create this IDENTITY column, how do we
create it?  Do we set a maximum to the value of this
column?  Or the value simply increases as the number
of records get inserted into the table grows?
3. when we try to insert the first record to this
table, does this record go to the first row in the
table?  And the value of the IDENTITY for this record
is 1?  When we try to insert the second record to this
table, does the second record automatically go to the
second row in the table?  And the value of the
IDENTITY is 2?




__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]