Re: secure user name for MySQL account?

2012-09-24 Thread Arthur Fuller
On this note, one thing that really bugs me about MySQL passwords is the inability to use special characters. In the SQL Server world, I let users choose their own passwords, but obeying these rules: It cannot be a dictionary word or sequence of words. It must contain at least one numeric digit.

Re: secure user name for MySQL account?

2012-09-24 Thread Arthur Fuller
Thanks for the update, Shawn. I'll check it out right now. On Mon, Sep 24, 2012 at 4:40 PM, Shawn Green shawn.l.gr...@oracle.comwrote: Hello Arthur, On 9/24/2012 4:25 PM, Arthur Fuller wrote: On this note, one thing that really bugs me about MySQL passwords is the inability to use special

Re: How to block SELECT * FROM table; but not SELECT * FROMT table WHERE...;

2012-09-23 Thread Arthur Fuller
Tim, I think you misunderstood the question. Daniel wants to block Select queries that ask for all rwows, and permit only queries that ask for some rows, as restricted by the Where clause. Unfortunately, I don't think that can be done. But I'm not certain of that; there might be a trick. Arthur

Re: Removing Data Duplicacy

2012-02-22 Thread Arthur Fuller
Only two businesses refer to their clientele as users: drug dealing and software development. -- Arthur Fuller

Re: strange select/join/group by with rollup issue....

2012-02-08 Thread Arthur Fuller
I'm not sure your method isn't working, but try changing changing the to date part to '2012-02-08' and see what you get. HTH, Arthur

Re: Editing/form interface

2012-01-19 Thread Arthur Fuller
You might want to have a look at our free utility called The_Usual, so named because it's what a regular customer says in a bar or restaurant. It's written in PHP and it does all the usual things such as Add, Edit, Search, and goes a bit further (master-detail forms, etc.) -- all automatically,

Re: Parent/Child - Linked List

2012-01-16 Thread Arthur Fuller
See the piece on trees at www.artfulsoftware.com. It goes into several variations of how to handle hierarchies. HTH, -- Arthur Cell: 647.710.1314 Prediction is difficult, especially of the future. -- Neils Bohr

Re: MySQL 5.1: Views, queries, updates and performance issues

2011-12-29 Thread Arthur Fuller
At first blush, your problem would appear to concern the lack of index-use. That's where I would begin my investigation. It might be painstaking, but I would do something like this: For each view Look at the Join(s) and see what columns are being joined Look at the tables and see what

Re: SQL DATA

2011-12-13 Thread Arthur Fuller
I am not sure that the db engineers should look into supporting recursive optimizations. That sounds to me like a waste of their time, and conversely an investment in your (my) time. This kind of thing is far too app-specific to generalize into an all-encompassing algorithm, IMO, and even if it

Re: Query query

2011-12-04 Thread Arthur Fuller
You should still lose the pointless WHERE 1. Arthur On Sun, Dec 4, 2011 at 1:38 AM, Jan Steinman j...@bytesmiths.com wrote: DOH! Brain unfroze, and I realized I needed an aggregate: SELECT COUNT(lib.Dewey) AS Have, ddn.Dewey AS DDN, ddn.Classification AS Classification FROM

Re: How to get a specific number of entries per one key ?

2011-12-03 Thread Arthur Fuller
A quick guess, or at least a starting point: SELECT key, data FROM myTable GROUP BY key LIMIT 2 HTH, Arthur On Sat, Dec 3, 2011 at 11:41 AM, Blog Tieng Viet blogtiengv...@yahoo.comwrote: Hellow everybody. I have a problem difficult for me, please give me an advice. I want to get a

Re: Index question

2011-10-11 Thread Arthur Fuller
The difference is based on the relative frequency of queries where a is important vs. where b is important. Either way, what will happen is that the index scan will isolate the first item mentioned, then scan the result set to isolate the second term. e.g. SELECT * FROM someTable WERE a =

Re: optimising for 100000 entries

2011-09-14 Thread Arthur Fuller
Forgive my bluntness, but IMO it is silly to attempt to retrieve a 100,000 rows, except for reporting purposes, and in that case, said reports ought to run against a replica, not the OLTP instance. Far better, IMO, is to present (in the UI) an alphabet as buttons, plus a textbox for refinements.

Re: optimising for 100000 entries

2011-09-14 Thread Arthur Fuller
Call me stupid, but IMO this is just plain Bad Design. Maybe your masters are making you want to deliver this, but it's frankly insane. Go instead with the Sally Rand Principle: show them just enough to pique their interest. Given that you've narrowed it down to the WHERE clause, try again. WHERE

Re: Arrays

2011-08-27 Thread Arthur Fuller
Another approach to this is to create a concatenated string from the PKs of the result set and then parse that within a stored procedure elsewhere in your Front End (FE). For more information on this, visit www.artfulsoftware.com and check out the Queries page. Arthur

Re: a lesson in query writing and (maybe) a bug report

2011-08-27 Thread Arthur Fuller
I agree 110%. It is completely pointless to index a column with that amount of NULLs. In practical fact I would go further: what is the point of a NULLable column? I try to design my tables such that every column is NOT NULL. In practice this is not realistic, but I try to adhere to this principle

Re: Hungarian Notation [Was Re: Too many aliases]

2011-08-07 Thread Arthur Fuller
I despise this sort of notation, and have instead adopted what have cheerfully named Hungarian Suffix notation, the reason being Signal-To-Noise ratio. Instead of prefacing everything with some form of prefix, just do the opposite: Customer_tbl Customer_Dead_boo Customer_DOB_date Customer_qs

Re: MySQL RAND() Issues [was Re: How to Shuffle data]

2011-07-15 Thread Arthur Fuller
This would be sooo much simpler to solve in MS-SQL, given the function NewID(), which is guaranteed to return a unique value. I have used this in a few web sites and it works splendidly; something along the lines of SELECT TOP 10 *, NewID() FROM User_Messages ORDER BY NewID which is guaranteed

Re: SQL book recommendation?

2010-10-26 Thread Arthur Fuller
Visit our site (www.artfulsoftware.com) for lots of tips, especially on queries. Arthur -Original Message- From: Philip Riebold [mailto:p.rieb...@ucl.ac.uk] Sent: Tuesday, October 26, 2010 7:31 AM To: MikeB Cc: mysql@lists.mysql.com Subject: Re: SQL book recommendation? On 26

Re: Best method to keep totals

2010-09-04 Thread Arthur Fuller
100% agreed. Arthur The other exception is also where financial data is being stored. If you have, say, a database containing sales order records, then as well as storing the individual values of each item in each order, you also need to store the total value of the order, the total price

Re: Best method to keep totals

2010-09-03 Thread Arthur Fuller
While I agree with the general take on this subject (Never store totals without a good reason and where there is duplication there is the opportunity for skew), I must say that there are exceptions. A couple of years ago I worked on an inherited database in which the operant principle was sum

Re: How Set Up This Table

2010-01-04 Thread Arthur Fuller
The ProductPackages table is what is known as an associate table, and is used to implement a many-to-many relationship. You only need it if a given product can be in multiple packages. If not, then you can eliminate the associative table and just add a PackageID column to the Products table.

Re: How Set Up This Table

2010-01-02 Thread Arthur Fuller
Hi Victor. I think that the first thing you need to consider is whether a product can be in more than one package, and second is whether a package can be in another package. Also, I don't know why you need to auto-generate in either case. It's pretty simple DDL. Case 1: product can only be in

Re: Is It Possible to create a Join with Multiple Tables

2009-09-26 Thread Arthur Fuller
I don't see why not, but another choice is to create a view that encompasses all these tables and Select * From my_view. Arthur On Fri, Sep 25, 2009 at 11:28 PM, c...@hosting4days.com c...@hosting4days.com wrote: :Newbie: Short Question: Is it possible to create an inner join (or another

Re: Retrieving info from 2 tbls ordering it

2009-09-23 Thread Arthur Fuller
I think that you can do what you want with a simple union query: select * from incoming where user_id = 123 union select * from outgoing where user_id = 123 order by datetime_received, datetime_sent hth, Arthur On Wed, Sep 23, 2009 at 10:02 AM, Warren Windvogel war...@fontera.comwrote: Hi I

Re: How to compare 2 columns in different tables.

2009-09-15 Thread Arthur Fuller
You may be able to get what you need with three queries. Join the tables on the column of interest. By default you'll get a list of the matches. Then you can modify the join by adding a WHERE clause that looks for table2.nameis null, and again by modifying the WHERE clause so it looks for

Re: database design

2009-09-12 Thread Arthur Fuller
Storing it directly will cause problems when you want to add a new Article Type. IMO it's better to have an ArticleTypes table (AutoIncrement) and store its values in the ArticleTypeID column in the Articles table. A. On Sat, Sep 12, 2009 at 1:19 AM, AndrewJames andrewhu...@gmail.com wrote:

Re: database design

2009-09-11 Thread Arthur Fuller
I agree with Claudio. You have your design correct. The only other thing you need is the uid qualifier. Presumably you are using PHP or some other front end to present your data. Your front end would request the user's name and password, saving the uid in a variable and then issuing the select

Re: Can a MyISAM DB hold /everything/?

2009-05-27 Thread Arthur Fuller
I second that emotion (don't store the images in the data file: just store the paths to said images). Why? Because in the event of an updated image it is more hassle than it is worth, to drop the old image and replace it with the new one; if what you store is a simple pointer to an image file,

Re: I thin'k MySQL will be the 'Oracle Personal Edition'

2009-04-22 Thread Arthur Fuller
The revenue that MySQL has accrued to date comes (obviously) from the support contracts. Oracle has no interest in derailing this revenue stream. It may well slow down the version cycle, which may be a good thing, but that aside, I cannot see Oracle killing the MySQL stream. There's no argument

Re: Sun bought by Oracle

2009-04-21 Thread Arthur Fuller
I too am a big entusiast of Sun's VirtualBox, and I hope that nothing goes sideways on this product. A. effects and that is VirtualBox. I've used MySQL for years and hope Oracle does not stop it, but you never know with Ellison encharge! Just my 2 cents. --

Re: Oracle , what else ?

2009-04-21 Thread Arthur Fuller
I hereby bet the farm that this shall not occur. I have $10 to say that this shall not occur. a) Who is going to challenge the deal? b) What possible purpose would it serve to interr MySQL? c) Assuming there is some reason for b) above, why incur the wrath of the MySQL community and their

Re: Sun bought by Oracle

2009-04-20 Thread Arthur Fuller
I think that you'e being paranoid. IMO, Oracle will continue to support and develop mySQL. Further, I think that these concerns about the future of mySQL overlook the points behind the purchase: 1. To obtain the Sun hardware and thus provide a complete hardware and software solution. 2. To

Re: Are equi-joins faster than left joins?

2009-04-04 Thread Arthur Fuller
IIRC it does not matter. But you can double-check my opinion with EXPLAIN. A. On Thu, Mar 12, 2009 at 11:41 AM, mos mo...@fastmail.fm wrote: I have 3 tables that are 1:1 and will always have a row for a given product,_code date. If I want to join them together, is it going to be faster to

Re: Search based where claused and stored proc

2009-03-29 Thread Arthur Fuller
An approach that has worked for me in the past and may work for you. Declare as many parms as you can possibly need and then code the statement like this: sql SELECT * FROM someWhere WHERE @parm1 = 123 OR @parm1 IS NULL AND @parm2 = 345 OR @parm2 IS NULL -- etc. This has the desired effect and

Re: Data structure for matching for company data

2009-03-27 Thread Arthur Fuller
My esteemed friend, partner and co-author has laid it out perfectly for you. Just follow the instructions table-wise. One thing that may not be obvious from Peter's prescription is that you need to enter a bunch of rows into the industry table first, so that the foreign keys will make sense in

Re: Separate customer databases vs all in one

2009-03-19 Thread Arthur Fuller
You only confirm my first-blush opinion: keep separate databases. Regarding your second issue (joining across databases for reports), I would suggest that these operations are best done against an OLAP database not the numerous OLTP databases. That is, create an additional database whose sole

Re: Separate customer databases vs all in one

2009-03-17 Thread Arthur Fuller
Are these databases identical or merely similar? If they are structurally identical, I'd go for one database per customer. Then you have isolation, easy structure updates and above all, consistent front-end code, in whatever language that occurs. Just obtain the customer ID and then use the

Re: Getting single results per (left) record with INNER JOIN

2009-03-14 Thread Arthur Fuller
Won't a simple LIMIT 1 do what you want? Or am I missing something? Arthur On Fri, Mar 13, 2009 at 3:24 PM, Nigel Peck nigel.p...@miswebdesign.comwrote: Nigel Peck wrote: SELECT `People`.`person_id`, `People`.`name` FROM `People` INNER JOIN `Person_postal_addresses` ON

Fwd: avoiding use of Nulls

2009-03-13 Thread Arthur Fuller
Exactly the point. Michael, NULL *is* information. It means unknown and that is in itself useful information. A common example: A new employee is hired but which department she will work in is unknown. So the data entry person enters all the known information and leaves the rest until it has

Re: avoiding use of Nulls

2009-03-13 Thread Arthur Fuller
On Fri, Mar 13, 2009 at 3:20 PM, Andy Wallace awall...@cisdata.net wrote: ggghh mich...@j3ksolutions.com wrote: On Fri, 13 Mar 2009, mich...@j3ksolutions.com wrote: Explanation(5): The more you understand how the database is to be used, and

Fwd: Codd's rule 8 (physical data idependence)

2009-02-13 Thread Arthur Fuller
-- Forwarded message -- From: Arthur Fuller fuller.art...@gmail.com Date: Fri, Feb 13, 2009 at 3:36 PM Subject: Re: Codd's rule 8 (physical data idependence) To: Yusuf Khan yousuf.kh...@gmail.com Sad to say, you cannot casually switch engines and hope that everything shall

Re: Foreign Keys

2008-10-08 Thread Arthur Fuller
So you are talking about parent-child relationships in a single table, or in the technical jargon reflexive relationships. See www.artfulsoftware.com for detailed examples of how this is done, but here is the thumbnail sketch: The table has to have a ParentID column (call it what you want) that

Re: Normalization vs. Performance

2008-08-29 Thread Arthur Fuller
Yours is the classic case of the distinction between OLTP and OLAP, and in my opinion you are doing it exactly right. For analysis purposes, de-normalization is a good thing because you eliminate the joins and increase performance, but even more important, you don't slow down the data-entry

Re: Insert into...on duplicate key problem

2008-07-09 Thread Arthur Fuller
I think that you need to select old.a otherwise you cannot group by it. Arthur On 7/9/08, Phil [EMAIL PROTECTED] wrote: Is it possible to do an insert into with subselect and group by with an additional on duplicate insert ? CREATE TABLE NEW_TABLE ( `a` varchar(10), `b` double )

Re: trouble with group by and similar tables

2008-06-05 Thread Arthur Fuller
What you need, basically, is to combine two queries, one of which addresses t1 and t2 while the other addresses t1 and t3. Create two views similar to your first query and then join the two views on t1.id and you'll get what you're after. hth, Arthur On Thu, Jun 5, 2008 at 3:44 PM, Eben [EMAIL

Re: Help needed

2008-05-12 Thread Arthur Fuller
I tested the program before running it and it is virus-clean. I ran it through AVG first and it's clean. I ran it in Windows. I don't know whether there is a Linux version. Arthur On Mon, May 12, 2008 at 11:31 AM, Velen [EMAIL PROTECTED] wrote: Hi Arthur, Could you please tell this guy that

Re: Starting a 2nd MySQL instance on UNIX

2008-04-29 Thread Arthur Fuller
Would you kindly supply the changes you made, for our collective education? Thanks. Arthur On Mon, Apr 28, 2008 at 11:54 AM, Mark-E [EMAIL PROTECTED] wrote: Hi Ian, Thanks for the reply. I was specifying the new port of 3307. I actually got it working over the weekend. Turns out I had to

Re: Display more than 2500 rows

2008-04-25 Thread Arthur Fuller
The first question that occurs to me is, Why on earth would you want an app to display 2500 rows? You must have one incredible monitor with a resolution beyond my wildest dreams! I would look into the LIMIT predicate and use it to grab say 50 rows at a time, or fewer, and post a marker so you know

Re: insert select

2008-04-03 Thread Arthur Fuller
The beauty of this language is exactly as Johan says, you can skip the obvious, Just insert all the other non-obvious columns. In the event that you have numerous defaulted columns, though, it's best to supply a NULL so the syntax is parallel (IMO), or alternatively to name the columns. But either

Re: [OT] When MySQL Bites: Quirks to Watch Out For

2008-03-28 Thread Arthur Fuller
Dis-information not mis-information. Someone has an axe to grind, methinks. Or just perhaps is puntificating to see wha' 'appen. The objections PB has raised all apply here in my installation. Arthur

Re: Indexing question

2008-03-25 Thread Arthur Fuller
What is the size of the text field you're fulltext indexing? How often is that index used? You might be best off to create a table containing only that column and a PK that is equal to the PK in the original table. You might also keep a portion of the text field (say 50 characters) in the original

Re: how to use index with order by here

2008-03-17 Thread Arthur Fuller
I love when this happens. I woke in the middle of the night with an idea for you. It now occurs to me that the query you want is dead simple. It just took me a while to see: SELECT * FROM messages WHERE id_from = 1 AND id_to = 2 UNION SELECT * FROM messages WHERE id_from = 2 AND id_to = 1 ORDER

Re: slow-query log analysis

2008-03-17 Thread Arthur Fuller
Wow! 70k files in /tmp. Hell of a mistake :) I hope it doesn't happen often. Arthur On 3/17/08, Soenke Ruempler - NorthClick [EMAIL PROTECTED] wrote: Hi Baron, There were about 70k files in /tmp (caused by a mistake). the web application on this server had many lookups to tmp and those were

RE: Licence Free Import/Export for Access?

2003-02-13 Thread Arthur Fuller
I have used dbScripter a lot for this kind of work. It is definitely NOT necessary to own Access to use it. One of its nice features is its database profiles. These function as data and syntax translation tables. For example, if a column type doesn't exist in the target, substitute another column

RE: [ sub select in 4.0.9-gamma? ]

2003-02-13 Thread Arthur Fuller
In the meantime, you can almost always perform the equivalent of a sub-select using an inner join (and sometimes a temp table). For example, a query to select all customers in the province of Ontario: SELECT * FROM Customers WHERE CityID IN( SELECT CityID FROM Cities WHERE ProvinceID = ON ) Can

RE: Create database via ODBC

2003-02-13 Thread Arthur Fuller
It's dead simple to create a MySQL database -- it's just a directory under mysql\data. If you want to do it from Access, just determine where the mysql\data directory is and then create the subdirectory. Hth, Arthur -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]

Re: auto increment question

2003-01-04 Thread Arthur Fuller
Yes you have neither triggers or stored procedures. Instead you'll have to remember to use the same code everywhere in your app that can update the table: Update mytable SET col1 = 'somevalue', col2 = 3456, col3 = now(), Viewed = Viewed + 1 hth, Arthur - Original Message - From:

RE: style question: drop database in an install script

2002-12-30 Thread Arthur Fuller
I don't know about anyone else, but for this sort of thing I love the program called DeZign, which is a data-modeling tool. You can draw your tables and their columns and set up relations and so on. DeZign will then write your code for you. Personally, I like to keep all my drop statements in one

Re: replication

2002-12-30 Thread Arthur Fuller
Is there in *nix an implementation of GUIDs? If the MS math is too be believed, GUIDs are guaranteed unique for the next century. No matter how many monkeys are at the typewriters. Supposing a) that there is a *nix GUID implementation, what's the right column type to use within MyISAM and InnoDB?

RE: InnoDB != FULLTEXT?

2002-11-19 Thread Arthur Fuller
In the meantime, Jan, you don't have to commit your whole database to one table type. Consider using MyISAM tables where you need fulltext search and InnoDB for your other data. Arthur -Original Message- From: Heikki Tuuri [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 19, 2002 12:02

RE: delete where column = null

2002-11-19 Thread Arthur Fuller
Nothing can be compared to null, not even null, which implies that MySQL is wrong in returning two rows in the SELECT. Your query needs to say IS NULL: delete from t where id = 1 and num is null; Arthur -Original Message- From: Andrew Braithwaite [mailto:[EMAIL PROTECTED]] Sent:

RE: Problems with simple(?) query

2002-11-18 Thread Arthur Fuller
SELECT * FROM foo WHERE id2=1 AND id2=2 (for example)... Given your structure, no row can satisfy your criteria. You are asking ID2 to have two values on one row, which is clearly impossible. Did you by chance mean: SELECT * FROM foo WHERE id2=1 OR id2=2 or alternatively SELECT

RE: Newbie: interfacing to MySQL?

2002-11-18 Thread Arthur Fuller
IMO you should begin with the command-line client mysql and get to know the various commands such as SHOW. Import some data from somewhere and play around with SELECT and UPDATE and joins. Once you have a basic understanding of these commands, then a GUI front end will be a lot more useful, IMO.

RE: RE: MySql 4.1 Sub Selects and not stored procedures

2002-11-11 Thread Arthur Fuller
I'm not sure where you're getting your information (Typically, db vendors recommend you use an exists clause, not a join when testing for the presence of child data because it's faster). Not to say that you're incorrect, just that in working for years with MS-SQL and Oracle and before that Sybase,

RE: query crushes server

2002-11-11 Thread Arthur Fuller
A Cartesian product will generate the number of rows in Table 1 times the number of rows in Table 2. For example if T1 has 1,000 rows and T2 has 10,000 rows your result set will contain 10,000,000 rows. Arthur - Eugene Bendersky wrote: May be this was reported

RE: Distributing table-files to other machines

2002-11-04 Thread Arthur Fuller
You can move the files and then set up symlinks to them in the /mysql/data/dbName directory. Arthur -Original Message- From: Michelle de Beer [mailto:michelledebeer;yahoo.com] Sent: Monday, November 04, 2002 8:21 AM To: [EMAIL PROTECTED] Subject: Distributing table-files to other

RE: self relation query help

2002-10-28 Thread Arthur Fuller
Yes, at first it may seem that groups are just another form of artist, and that your searches would be simpler, but if you put them both in a single table, how do you model someone like say Paul McCartney, who was in the Beatles and Wings? Or Yo Yo Ma, who has guested with every important symphony

RE: how do you define a relationship?

2002-10-23 Thread Arthur Fuller
;Bytesmiths.com] Sent: Monday, October 21, 2002 12:07 PM To: [EMAIL PROTECTED] Subject: RE: how do you define a relationship? From: Arthur Fuller [EMAIL PROTECTED] Unfortunately that oversimplifies the situation. A least a few movies have more than one director. My motto: Generalize for the norm; specialize

RE: ERD, Scripts, and Reverse Engineering

2002-10-21 Thread Arthur Fuller
I work with DeZign as well and chose it for basically the same reason as you. I particularly love the fact that it supports domains. I have been communicating with the author and encouraging him to add specific InnoDB table types. I also suggested another feature to him that he really liked; we

RE: how do you define a relationship?

2002-10-21 Thread Arthur Fuller
for Writer, Director and Actor. Now create a table called MovieRoles with foreign keys into TalentRoles and Movies. Then you add as many people to a movie as you want, nw whatever roles are legitimate for those people. I.e. you couldn't add Clint as a writer. hth, Arthur Fuller -Original Message

RE: Suggestions for breaking large table into smaller?

2002-10-18 Thread Arthur Fuller
If your contacts are all North American, and this is a typical query, you may well profit significantly from normalizing the address data. To do so, create a Cities table and a States table (perhaps call it Regions if you need to account for CDN provinces). The Cities table would look like:

Re: Normalization sql

2002-10-16 Thread Arthur Fuller
. You may want to modify the Stars table to reference Videos rather than Titles, since the stars remain the same even if you translate the film into Russian or Swahili. hth, Arthur - Original Message - From: John Chang [EMAIL PROTECTED] To: Arthur Fuller [EMAIL PROTECTED]; [EMAIL PROTECTED

Re: Why must I quote fields now?

2002-10-14 Thread Arthur Fuller
It's always a bad idea to name your columns using keywords. - Original Message - From: olinux [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 14, 2002 5:42 AM Subject: Why must I quote fields now? Hi all, I have just added a field (order) to a table with about 12,000

Re: Type

2002-10-14 Thread Arthur Fuller
The MyISAM table type should be fine for what you are doing, and is faster than the InnoDB type. Basically, you only need transactions in situations where a) money is involved or b) you will be updating multiple tables and all updates must be guaranteed successful, or none. hth, Arthur -

Re: Normalization sql

2002-10-14 Thread Arthur Fuller
You're starting off ok, just missing the links between the tables. I would suggest for simplicity though that you change the names of your PKs to reflect their table, i.e. Title (VideoTitle, Details, TitleID). Otherwise once you do multi-table queries joins you will have to specify the table

Linux GUIDs

2002-10-04 Thread Arthur Fuller
Does MySQL support GUIDs? Is there any code around that is equivalent to the built-in M$-SQL function NewID(), which returns a GUID? TIA, Arthur - Before posting, please check: http://www.mysql.com/manual.php (the manual)

Re: Is there Examples and Documents on joining tables?

2002-10-03 Thread Arthur Fuller
Once you understand the logic of joins the rest is pretty straightforward, since in terms of execution the sequence in which you do the joins is irrelevant. (Performance is another issue, quickly resolved by specifying the smallest tables first.) Supposing that you have tables Products,

Re: Is there Examples and Documents on joining tables?

2002-10-03 Thread Arthur Fuller
Yes there are. First do as you have written, although your syntax is a bit wrong but the email compiler forgives such stuff :-) SELECT table1.bunch, table2.of, table3.stuff FROM table1 INNER JOIN table2 ON table2.some_id INNER JOIN table3 ON table3.some_id WHERE table1.some_id =

Re: Is there Examples and Documents on joining tables?

2002-10-03 Thread Arthur Fuller
Send me create-table scripts and population scripts and I'll do this for you. But on rereading your message I'm guessing that your normalization is wrong. You have more than one multi-valued dependency. Your example description is either wrong or insufficient. T1 (presumably the parent of all

Re: MySQL as a desktop DB

2002-09-29 Thread Arthur Fuller
I don't think Access is crap at all. In fact I think it's a) the best RAD front end going for SQL Server and perhaps for MySQL too. I use Access 2000 and 2002 + MyODBC to create front ends to MySQL databases and the combination works great. In less than one morning I successfully ported the

Re: Copying a Table

2002-09-28 Thread Arthur Fuller
To where? Another table? More information is required. - Original Message - From: Shaun Bramley [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, September 28, 2002 1:18 PM Subject: Copying a Table Hello all, I have yet to find this bit of information within the

RE: Basic SQL join question

2002-09-24 Thread Arthur Fuller
SELECT * FROM Projects INNER JOIN KeywordLink ON Projects.Id = KeywordLink.Pid INNER JOIN Keywords KeywordLink.Kid = Keywords.Id WHERE Keyword LIKE '%historical%' AND Keyword like '%scenic%'; 1. Note the single quotes. 2. You can place the join logic in the WHERE clause but I prefer the clarity

Re: Basic SQL join question

2002-09-24 Thread Arthur Fuller
Oops! Quite right -- ON is necessary after the word JOIN. That was written in the email compiler :-) Sorry I should have proofread it before hitting Send. Arthur - Original Message - From: Josh Trutwin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 24, 2002 12:46 PM

Re: MySQL Gui Install and Setup for Win2K

2002-09-22 Thread Arthur Fuller
We were told by David Axmark of MySQL AB to stop using MySQLGui and switch to MyCC. MySQLGUI is apparently dead. - Original Message - From: David Kramer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 16, 2002 12:52 PM Subject: MySQL Gui Install and Setup for Win2K Can

Re: Thanks to MySql and it's Developers

2002-09-18 Thread Arthur Fuller
I can only think that's because you haven't used a Windows system. My principal client's Windows system has been up for over a year. Win2K Server. I brought the server down a couple of times to update table structures etc., but the OS has never failed us. Not once. Arthur - Original Message

Re: Re: MS Access and mySQL]

2002-08-28 Thread Arthur Fuller
You didn't mention whether they are planning on keeping the NT box, but I assume that they are, and that what you want to do is leave the Access app working, but point it to the Linux-MySQL QUBE. I have been there and done that (well, except for the QUBE part -- I run Mandrake 8 on an old P-233.

Re: MS Access and mySQL

2002-08-28 Thread Arthur Fuller
to the database. Arthur - Original Message - From: [EMAIL PROTECTED] To: Arthur Fuller [EMAIL PROTECTED] Sent: Wednesday, August 28, 2002 1:57 PM Subject: [Fwd: RE: MS Access and mySQL] wodya think? Original Message From: Nicholas Stuart [EMAIL PROTECTED] Subject: RE: MS

Re: Php query from sql

2002-08-12 Thread Arthur Fuller
In the simplest case, LanguageSkill and City are columns in the Persons table. (That's the wrong way to do, IMO, but it is the simplest case.) Suppose Language Skill is an integer column and City a char(50). So your query becomes: SELECT * FROM Persons WHERE LanguageSkill = 5 AND City =

Re: ORDER BY RAND() not working

2002-07-12 Thread Arthur Fuller
I don't have your exact setup installed so cannot verify this, but how about rewriting your statement a little? I just tried this in mysql and it works fine, so it may from php. Let me know :-) Change the query to: SELECT *, Rand() as MyOrder FROM products WHERE sale_price IS NOT NULL ORDER BY

Size of BLOB and TEXT columns

2002-06-06 Thread Arthur Fuller
In SQL DDL, what are the maximum sizes of the various BLOB and TEXT column types? TINYBLOB, BLOB, MEDIUMBLOB and LONGBLOB and the corresponding TEXT types? I've searched the manual but couldn't find these specs. At what point should I choose BLOB over TINYBLOB, and so on? TIA, Arthur

Maximum JOINED tables

2002-06-05 Thread Arthur Fuller
I have searched the manual without success. I want to know the maximum number of tables MySQL permits to be JOINed in a single SELECT statement. TIA, Arthur - Before posting, please check: http://www.mysql.com/manual.php

Re: Get the next AUTO INCREMENT value for a column

2002-05-05 Thread Arthur Fuller
IMO the desire to know this answer suggests that something is wrong with the design. Again IMO, a PK must be absolutely meaningless. Any attempt to impost meaning on it is by definition wrong. By my lights, the only PK you want to know is the one just added. That's enough information to let you

Re: Migration from windows to linux

2002-05-03 Thread Arthur Fuller
I use a shareware tool called dbScripter (www.dkgas.com), which is very cheap to license. It lets you generate scripts that will create table structures, indexes and table-loads. It comes with syntax profiles for SQL Server, Oracle and Access, and you can also create your own profiles. I created

Re: dummy queries + csv dump

2002-04-26 Thread Arthur Fuller
Maybe it would be enough if you created a little syntax window on your GUI and an Execute button beside it, so you could see what was going to be sent to the engine before clicking Execute. Just a thought, Arthur - Original Message - From: Petre Agenbag [EMAIL PROTECTED] To: [EMAIL

Re: I thought MySQL Supported Relationships

2002-04-23 Thread Arthur Fuller
Perhaps I fail to catch the humour in your response, or the flavour of this newsgroup, but I find your answer in no way helpful, and beyond that quite insulting to Access. 1. I have developed applications in Access comprising over 1000 tables, some of which contain millions of rows, with

Re: [MANY to MANY] relationship with MySQL ???

2002-04-17 Thread Arthur Fuller
This is the classic case for a junction table (aka bridge table, associative table). It sits between Artists and Songs; let's call it PlaysOn. Artists: ArtistID: autoincrement ArtistName: varchar DOB: date etc. Songs: SongID: autoincrement SongName: varchar Duration: in seconds, say etc.