Re: Trying to do a set difference
I think this is a subselect and not supported yet - read on subselects in the manual; I did a search and here we are: http://www.mysql.com/doc/M/i/Missing_Sub-selects.html Lindsay G Mccracken schrieb am Freitag, 24. August 2001, 15:02:11: >>Date: Thu, 23 Aug 2001 17:39:14 +0100 >>To: [EMAIL PROTECTED] >>From: Lindsay G Mccracken <[EMAIL PROTECTED]> >> >> Trying to do a set difference, >>select * from staff where NOT IN (select * from Supervises where Role='0' ); >>Can't seem to get it to work, is there a different way of doing this in >>mqsql?? > Can't seem to find in the documentation >>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 Herzlich Werner -- MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Dr. Werner Stürenburg <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant /_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany <___/ www.mysql.com +49-5224-997-407 Fax -409 - 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: myODBC?
In my understanding, myODBC is a middleware for programs which don't know how to deal directly with mySQL. So if you use perl or php, you won't ever use ODBC, as this only slows things down, obviously. ODBC is kind of a workaround in my understanding. Please correct me, if I'm wrong. Wen Tien schrieb am Freitag, 24. August 2001, 14:39:55: > Hi, > I am a newbie that has a question about what exactly is myODBC (for Unix) > doing. Is myODBC, 1) a "wrapper" over the mySQL database to make it conform > to the ODBC interface or 2) a plug-in driver that goes with a manager > program to allow the access of mySQL db? I am using an Irix machine that > tries to use a mySQL db on a Linux box (natively via port forwarding) so I'm > trying to decide where to install what... thanks. > Wen Tien > - > 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 Herzlich Werner -- MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Dr. Werner Stürenburg <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant /_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany <___/ www.mysql.com +49-5224-997-407 Fax -409 - 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: Mailing labels
Please tell us some details: what are your tables, which program shall actually produce the labels etc. A database holds data. If you manage to get them and stuff them into Excel or Word, that sounds fine to me. How would you like to do it? Bruno Perozzo schrieb am Freitag, 24. August 2001, 11:33:00: > Hi! > Does anyone know the correct tag sequence to produce Mailing labels with > the 1.7.5.1 version of mysql, I try every wich way to produced them, but > I had to resort to export the data to excell or word in order to produce > them. > Bruno Herzlich Werner -- MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Dr. Werner Stürenburg <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant /_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany <___/ www.mysql.com +49-5224-997-407 Fax -409 - 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: Tourn off Errors displaying
I know what you can do if you use php: prefix the function in question with @, that will turn errors off. Example: @mysql_connect( instead of mysql_connect( Christian Eichert schrieb am Freitag, 24. August 2001, 12:47:55: > Hi > How can I turn off the error displaying ... > sometimes when the script could not connect to the DB or in fact I do not > want to show these Errors at all > OK for things like MYSQL_CONNECT or MYSQL_SELECT_DB I use OR DIE > but what can I use for query's inside of other select's ... > I can't put OR DIE there it's to complicated > I like to turn off the error handling completly... > or is there an other elegant method? > mfg > Christian Eichert > +49 177 545 7378 > [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 Herzlich Werner -- MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Dr. Werner Stürenburg <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant /_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany <___/ www.mysql.com +49-5224-997-407 Fax -409 - 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: Select statement didn't return results though there should be results
>> But also consider, if you don't want to ask for >> >> select >> subject,subhead,subsubhead,data2,data3,see_also >> from npl_detail >> >> where (subject like '% asia %' >> AND NOT subject like '%winter%') >> OR >> ORDER BY >> subject, subhead, subsubhead desc >> limit 0, 15 >> > THanks for the kind reply. The above statement still > doesn't return any result. However, if I change it to > as follows, it will return results: > select subject,subhead,subsubhead,data2,data3,see_also > from npl_detail > where (subject like '% asia %' > AND subject NOT like '%winter%') > OR > ORDER BY > subject, subhead, subsubhead desc > limit 0, 15 > Logically, there is no difference between this and the > one you gave me. MySql is new to me. Does it mean any > difference in MySQL? I am trying more changes. Oh, I had trouble seeing the difference first. Yes, I think this will be the reason. But I didn't see the problem and asked Sinisa about it as such: > select bla from foo > where (subject like '% asia %' > AND NOT subject like '%winter%') > OR etc. > > select bla from foo > where (subject like '% asia %' > AND subject NOT like '%winter%') > OR etc. > > The user states that these are logically equivalent - and I think > he is correct. But the result sets are different. Sinisa writes: They are NOT logically equivalent !! Second one is the correct one. First one means always make 0 out of (NOT subject like "%...%"). Second one means AND subject is not like ... Herzlich Werner -- MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Dr. Werner Stürenburg <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant /_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany <___/ www.mysql.com +49-5224-997-407 Fax -409 - 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: joins with concatenated keys
[EMAIL PROTECTED] schrieb am Freitag, 24. August 2001, 13:43:15: > table a has ak1 and ak2 as primary key > table b has bk1 and bk2 as primary key > how do I join these tables? > if i write > where a.ak1 = b.bk1 and a.ak2 = b.bk2 > data are returned multiple times. Well this should be. You should have more constraints like AND a.name LIKE 'joe%' or something or you use SELECT DISTINCT See also http://www.mysql.com/doc/S/E/SELECT.html http://www.mysql.com/doc/D/I/DISTINCT_optimization.html Herzlich Werner -- MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Dr. Werner Stürenburg <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant /_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany <___/ www.mysql.com +49-5224-997-407 Fax -409 - 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: database action
Martijn Rotteveel schrieb am Freitag, 24. August 2001, 00:21:53: > i need a SIMPLE method for performing some pre defined actions on my tables, > these actions involve retrieving strings, recombining them and inserting > into another table. I don't know exactly what you mean, but if I do, I would write some functions which do the job. For example, this function retrieves the address of a client from the client ID: function getAddr($id){ ... } In these functions, you are not limited in any way except by your skills and fantasy. Herzlich Werner -- MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Dr. Werner Stürenburg <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant /_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany <___/ www.mysql.com +49-5224-997-407 Fax -409 - 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: store and display image with java
Bin Cai schrieb am Donnerstag, 23. August 2001, 23:24:01: > could you tell me how to store image in mysql database and display on web > using java. urgently Do it like any other insert, but care for special characters. In php, you would wrap data with addSlashes() and remove them on retrieval with stripSlashes(). But... you better not insert images into a table. Yes, you can do it, but it is generally considered a bad idea. Read about it at http://www.bitbybit.dk/mysqlfaq/ - if the images have to be provided by users, use the upload functions of your system. php for example has upload support built in. Next you have to care for the appropriate write rights for those files. These can be handled safely without compromising system security. Store all data associated with the pictures in a table except the picture itself, which should be taken care of by the file sytem. rasmus on files in databases: When dealing with images, it is of course possible to insert the image data into the database as binary blobs. However, the value in doing that is questionable. Until databases provide you with cool pattern recognition tools that will let you search a blob for a picture of a rose, having the image data itself in the database isn't of much use. Every operating system comes with a finely tuned blob database. It is called your file system. So, just put the full-path filename into the database and leave the images sitting somewhere on your disk. You will save yourself much aggrevation in the long run. http://conf.php.net/pres/index.php?p=slides%2Fintro&id=or2001 Herzlich Werner -- MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Dr. Werner Stürenburg <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant /_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany <___/ www.mysql.com +49-5224-997-407 Fax -409 - 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: Encryption of Data
Jeremy Falcon schrieb am Donnerstag, 23. August 2001, 21:46:02: > Contact your ISP and ask them if they already have and/or willing to set-up > something for you. Yes, there are always many ways to do things - but before I give another, I'd really like to hear about the kind of task at hand here. For example: how often do you need that, how much data is transferred, what about the skills of the person who is in charge, can it be done manually at all, etc. I think it is good to ask about the cost of a solution in terms of time and effort and (therefore) money. So many people have answered this one without knowing anything about the job at hand - and I guess this can go on like this for a while. Herzlich Werner -- MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Dr. Werner Stürenburg <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant /_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany <___/ www.mysql.com +49-5224-997-407 Fax -409 - 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: Encryption of Data
Elizabeth Alderton schrieb am Donnerstag, 23. August 2001, 09:44:36: > Thanks for suggesting cron - can you tell me what it is? cron is a program on Linux to run scheduled programs. So you write a program and tell cron to execute it in any kind of interval you can think of. I don't know if you must have root access to be able to do that - if so, your ISP won't give it to you. Normally, you should be quite seasoned in Linux to work with cron ... Herzlich Werner -- MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Dr. Werner Stürenburg <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant /_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany <___/ www.mysql.com +49-5224-997-407 Fax -409 - 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: shadow tables?
Is it an option to drop the table and recreate and repopulate it? I would give it a try and think that your problem will be gone. You can easily do that with mysqldump. Ask again if you need more help. Alex Pukinskis schrieb am Mittwoch, 22. August 2001, 22:48:26: > I've made some progress figuring out my case issue. It seems that somehow > I'm ending up with shadow tables. I discovered this after I ran an ALTER > command. My db has 4 tables: mysql>> show tables\g > +-+ > | Tables_in_hbperfrev | > +-+ > | employee| > | perfassessment | > | perfreview | > | workgroup | > +-+ > 4 rows in set (0.01 sec) > When I look at the perfassessment table, I see the two rows that I added via > alter, q10 and q11: mysql>> describe perfassessment\g > ++--+--+-+-++ > | Field | Type | Null | Key | Default | Extra | > ++--+--+-+-++ > | ID | int(11) | | PRI | NULL| auto_increment | > | AssesseeID | int(11) | YES | | NULL|| > | AssessorID | int(11) | YES | | NULL|| > | AssessDate | date | YES | | NULL|| > | q1 | char(1) | YES | | NULL|| > | q2 | char(1) | YES | | NULL|| > | q3 | char(1) | YES | | NULL|| > | q4 | char(1) | YES | | NULL|| > | q5 | char(1) | YES | | NULL|| > | q6 | char(1) | YES | | NULL|| > | q7 | char(1) | YES | | NULL|| > | q8 | char(1) | YES | | NULL|| > | q9 | char(1) | YES | | NULL|| > | ReviewID | int(11) | | | 0 || > | q10| varchar(255) | YES | | NULL|| > | q11| varchar(255) | YES | | NULL|| > ++--+--+-+-++ > 16 rows in set (0.00 sec) > but when I capitalize (PerfAssessment) those two rows are not there: mysql>> describe PerfAssessment\g > ++-+--+-+-++ > | Field | Type| Null | Key | Default | Extra | > ++-+--+-+-++ > | ID | int(11) | | PRI | NULL| auto_increment | > | AssesseeID | int(11) | YES | | NULL|| > | AssessorID | int(11) | YES | | NULL|| > | AssessDate | date| YES | | NULL|| > | q1 | char(1) | YES | | NULL|| > | q2 | char(1) | YES | | NULL|| > | q3 | char(1) | YES | | NULL|| > | q4 | char(1) | YES | | NULL|| > | q5 | char(1) | YES | | NULL|| > | q6 | char(1) | YES | | NULL|| > | q7 | char(1) | YES | | NULL|| > | q8 | char(1) | YES | | NULL|| > | q9 | char(1) | YES | | NULL|| > | ReviewID | int(11) | | | 0 || > ++-+--+-+-++ > 14 rows in set (0.00 sec) > So clearly I have duplicate tables, and this explains all the case > sensitivity problems I was having earlier. But why doesn't the second one > show up when I do "show tables"? And how do I get rid of the second one? > Any help is much appreciated, as I've been banging my head against the wall > for days. Again, this is 3.23.39, compiled from source, running on OS X > Server (details below). > Another question: I'm trying to remove some unused databases, but this > command: > ./mysqladmin -u root -p drop ac > (where 'ac' is the database name) doesn't seem to actually remove them from > the mysql database. Is there another command that completely removes > databases? > Thanks, > -Alex Herzlich Werner -- MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Dr. Werner Stürenburg <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant /_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany <___/ www.mysql.com +49-5224-997-407
Re: Select statement didn't return results though there should be results
Calvin Xu schrieb am Donnerstag, 23. August 2001, 03:16:09: > select subject,subhead,subsubhead,data2,data3,see_also > from npl_detail where ( (subject like '% asia %' OR > subhead like '% asia %' OR subsubhead like '% asia %' > or data2 like '% asia %' or data3 like '% asia %' or > see_also like '% asia %')) AND NOT (subject like > '%winter%' OR subhead like '%winter%' OR subsubhead > like '%winter%' OR data2 like '%winter%' OR data3 like > '%winter%' OR see_also like '%winter%') ORDER BY > subject, subhead, subsubhead desc limit 0, 15 > But if I shorten some OR condition with NOT(), some > results would return. The query looks fine to me. I would investigate if the result is not correct, i.e. you don't have any record that complies to the constraint. But also consider, if you don't want to ask for select subject,subhead,subsubhead,data2,data3,see_also from npl_detail where (subject like '% asia %' AND NOT subject like '%winter%') OR (subhead like '% asia %' AND NOT subhead like '%winter%') OR (subsubhead like '% asia %' AND NOT subsubhead like '%winter%') OR (data2 like '% asia %' AND NOT data2 like '%winter%') OR (data3 like '% asia %' AND NOT data3 like '%winter%') OR (see_also like '% asia %' AND NOT see_also like '%winter%') ORDER BY subject, subhead, subsubhead desc limit 0, 15 Herzlich Werner -- MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Dr. Werner Stürenburg <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant /_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany <___/ www.mysql.com +49-5224-997-407 Fax -409 - 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: Quoting in Queries
Hans Zaunere schrieb am Dienstag, 21. August 2001, 17:27:47: > Can someone explain to me when and when not to use > single, double, or no quotes at all around values in a > query. I noticed when I updating an enum field I > needed a quote, but not when updating an int field. > Or could someone point me to a good online reference > on the subject. Nobody there to give it a try: I guess this is because programmers are lazy. So they omit quotes if they can. And they can once it is agreed upon what it means. It is best done with numbers, because you can check when it begins and ends easily, but not good with strings and the like for the same reasons. -- Herzlich Werner MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Dr. Werner Stürenburg <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant /_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany <___/ www.mysql.com +49-5224-997-407 Fax -409 - 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: LAST_INSERT_ID()
Curtis Maurand schrieb am Mittwoch, 22. August 2001, 21:17:40: > A caveat is that you get the last_insert_id for your connection. Not the > last one in the database. I'm puzzled. There is no last_insert_id of the database, only of a certain table, and it is indeed the one last manipulated. So you always know which last_insert_id you have. -- Herzlich Werner MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Dr. Werner Stürenburg <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant /_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany <___/ www.mysql.com +49-5224-997-407 Fax -409 - 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: Encryption of Data
Elizabeth Alderton schrieb am Mittwoch, 22. August 2001, 17:00:53: > If I do a SELECT query to bring data down to a PC (this is > being done through Delphi) how can I encrypt the data so that > it comes safely? > Equally when doing UPDATE and INSERT in the other direction I > would want to encrypt the data. Some people do it with ssh, and it seems to be quite complicated, so that it may be worthwhile to wait for 4.0. If you have only small sets of data, you may want to consider simple SSL protocol. This is what everybody does when collecting user data like addresses and credit card numbers. -- Herzlich Werner MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Dr. Werner Stürenburg <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant /_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany <___/ www.mysql.com +49-5224-997-407 Fax -409 - 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: Virtual Server?
Jason Brunk schrieb am Mittwoch, 22. August 2001, 19:45:58: > i read somewhere that you can setup virtual mysql servers, so > that users can actually have their own sql server to administer > with whatever databases they want to create, with out > interferring or even seeing other peoples databases. Does > anyone know how to do this? could you help me? I don't know, but nobody answers, so: I know that it has been discussed, and IIRC it is in the readme and manual and it isn't hard. You create a socket each and assign one to each server and a port ot listen to. But... it costs memory and maybe some more as you double things. This isnt't a good idea if you have 200 clients on a machine with a server for each. ISPs don't have a problem with this as each user has access to his database only. He knows the names of the other, but these are mostly the domain names, and he knows them from ther directory tree already. Same principle: you don't have access except to your own. -- Herzlich Werner MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Dr. Werner Stürenburg <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant /_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany <___/ www.mysql.com +49-5224-997-407 Fax -409 - 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: LAST_INSERT_ID()
Jari Mäkelä schrieb am Mittwoch, 22. August 2001, 14:57:06: > At 13:19 22.8.2001 +0200, you wrote: >>LAST_INSERT_ID() should return the last autoincrement value of >>the last insert > Yep it sure did, managed to get to machine and test it out. Total mess. > but; > $query = "SELECT LAST_INSERT_ID()"; > $result = mysql_query($query); > if ($result) { > $nrows = mysql_num_rows($result); > $row = mysql_fetch_row($result); > $lastID = $row[0]; > } > was a code sent to me and if it helps anyone there it is, do not know who > is the original author but this takes the Id from first insert in you put > it after it and then you can use the $lastID in following inserts, works fine. Why not use mysql_insert_id(); -- Herzlich Werner MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Dr. Werner Stürenburg <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant /_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany <___/ www.mysql.com +49-5224-997-407 Fax -409 - 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 Installation
Jaitly, Rajiv (Contractor) schrieb am Dienstag, 21. August 2001, 10:14:33: > I installed the latest release of MYSQL on windows 2000 environment (non > networked). I would like to add the mysql server start up as a service at > system startup. Could anybody tell me how to do this. >From my readme: This distribution of MySQL includes the new winmysqladmin.exe by Miguel A. Solórzano. With this you can install MySQL as a service, start the service and monitor MySQL. This will also automaticly shut down MySQL on Win9x when the machine needs to be rebooted. Don't know if this applies to NT as well, but I should think so and you can find out immediately. -- Herzlich Werner MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Dr. Werner Stürenburg <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant /_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany <___/ www.mysql.com +49-5224-997-407 Fax -409 - 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: Looking for Info on
[EMAIL PROTECTED] schrieb am Dienstag, 21. August 2001, 21:07:24: > Also I am looking for and examples on building a MySQL Manager in Delphi as well. There is one out there already: http://mysqlfront.de See also http://anse.de/ -- Herzlich Werner MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Dr. Werner Stürenburg <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant /_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany <___/ www.mysql.com +49-5224-997-407 Fax -409 - 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: Startin MySQL upon boot in Win2k
Mikkel Gravgaard schrieb am Mittwoch, 22. August 2001, 11:16:47: > Since I like my hard drive more tidy than my house, I've put MySQL in > C:\Program Files\MySQL. > This means that I currently have to start MySQL using a .bat file, since the > mysql-daemon won't find the MySQL-directory if I install it as a Service: > --- MySQL.bat --- > cd C:\Program Files\MySQL\bin > mysqld --basedir="C:\Program Files\MySQL" > -- > The .bat file is put in the Startup-folder, but this means that when Win2k > Professional has booted, I end up with a command-window on my desktop, which I'll > have to manually close. > Can anyone think of a bit more smooth way to get it all going? Excerpt from my Readme: - This version is configured to be installed in c:\mysql. You can however copy this anywhere as long as you don't change the directory structure. For example: mkdir d:\mysql xcopy c:\mysql\*.* d:\mysql mysqld should be able to automaticly find its files based on where mysqld is located. If you want to use files from some other place, you can tell mysqld to use some other directory with --basedir='path'. You can also create a c:\\my.cnf file that holds any default options for the MySQL server. - If you have problems installing mysqld as a service, try starting mysqld with the full path: 'C:\mysql\bin\mysqld --install'. If this doesn't work, you can get mysqld to start properly by fixing the path in the registry! -- Herzlich Werner MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Dr. Werner Stürenburg <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant /_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany <___/ www.mysql.com +49-5224-997-407 Fax -409 - 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: LAST_INSERT_ID()
Jari Mäkelä schrieb am Mittwoch, 22. August 2001, 11:31:01: > Hi, > in the manual there is this LAST_INSERT_ID() and it is what I actually need > but there is some confusion over how to use it in many tables. > http://www.mysql.com/doc/O/D/ODBC_and_last_insert_id.html> > Or, if you are just going to insert the ID into another table, you can do > this: > INSERT INTO foo (auto,text) VALUES(NULL,'text'); > INSERT INTO foo2 (id,text) VALUES(LAST_INSERT_ID(),'text'); > http://www.mysql.com/doc/O/D/ODBC_and_last_insert_id.html> > I have database where most of the data is entered at once to multiple > tables and the linking reference is the ID of the main table. Would this > command just take the first ID and use it in other tables or would it take > it from the new id of the other tables? > What I mean is, would this code use the ID of first insert in all inserts ? > INSERT INTO foo (auto,text) VALUES(NULL,'text'); > INSERT INTO foo2 (id,auto1,text) VALUES(0,LAST_INSERT_ID(),'text'); > INSERT INTO foo3 (id2,auto2,text) VALUES(0,LAST_INSERT_ID(),'text'); > or would it take the first last_insert_id() from first line and second from > second line? I don't have the time to test it, but I would think that LAST_INSERT_ID() should return the last autoincrement value of the last insert, so if you have autoincrement columns to all your tables, you won't get what you want or rather run into big trouble :-( You play safe if you stuff the first number you are interested in into a variable of your program and use this one for all subsequent inserts. -- Herzlich Werner MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Dr. Werner Stürenburg <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant /_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany <___/ www.mysql.com +49-5224-997-407 Fax -409 - 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: How to get all of mysql error message
½ÉÃ溸 schrieb am Mittwoch, 22. August 2001, 11:50:05: > Hi. > I examined mysql/Docs/mysqld_error.txt. > But this file has error information from errno 1000 to 1175. > I want to know all of error numbers and messages I can see when programming > mysql access code. >From the shell, use perror number, i.e. perror 127 gives Record-file is crashed -- Herzlich Werner MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Dr. Werner Stürenburg <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant /_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany <___/ www.mysql.com +49-5224-997-407 Fax -409 - 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: Setup own DB for each user?
Ulv Michel schrieb am Mittwoch, 22. August 2001, 11:53:01: > Hi all, > I am running a webhosting server using SuSE 7.2 /mysql 3.23 /php 4. We are > hosting a small amount of virtual servers, allowing our customers to user > php and mysql. My problem is that every user sees every other users > databases. Is there a way to setup mysql so that every local user has his > own empty database? Please tell me how this has to be set up. I don't think this can be done. Please correct me if I'm wrong. ISPs don't have trouble with it as this info doesn't lead somewhere. Users cannot access databases of other users unless set up this way, they only have names. The names usually correspond to the subdirs of those users, and every user can see these as well using telnet or ftp. So what's the point? -- Herzlich Werner MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ /Dr. Werner Stürenburg <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant /_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany <___/ www.mysql.com +49-5224-997-407 Fax -409 - 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: case sensitivity issue
> I'm having trouble with what appears to be a case sensitivity issue. > Essentially, when I use the "right" case for a table name, the query fails, > but when I use the wrong case, the query succeeds. Well, it seems to depend on the system you are using. I noticed that when I created tables through phpMyAdmin on my local Win system, that the table(=file) was created on disk lower case only. It doesn't matter on Win, as the file system is not case sensitive, but it does on Linux. So you have to be careful if you transfer tables. I didn't see the create table syntax make any mistakes, so I think it is phpMyAdmin, but I don't know - I didn't care to check. Check the tablename(=filename) and rename the table or change the name in your scripts. -- Herzlich Werner Stürenburg _ ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409 http://pferdezeitung.de - 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