Re: Data dictionary as a table
Erv, Does MySQL have anything functionally equivalent to the data dictionary views of Oracle? I am thinking particularly of retrieving, via a SQL SELECT statement, a list of all my tables, or a list of all the columns of a particular table along with the columns' attributes. Installed as part of the MySQL DBMS, there is a database called MySQL containing a bunch of tables (similar to the Oracle structure) called user, db, and host (plus others). These control access to the db structure built up. The first manual note I came across on this topic was: 4.2.5 How the Privilege System Works In terms of viewing the table-contents of specific databases and the structure of the tables themselves, the SQL DDL (Data Definition Language) commands are discussed in various parts of Chapter 6 of the manual. However, in my experience using a DB Administration package is usually easier and faster. In native-SQL, these can be carried out without resorting to developing your own SELECT stmt. Does the combination of these answers cover what you wanted to know? =dn - 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: SQL Server 2000
try http://www.appsolute.nl/heraut/ you can use importerscript to run db_dump.sql from you M$ SQL Server into dezign and then change the db type to mysql. hth Norman -Original Message- From: Stan Lester [mailto:[EMAIL PROTECTED]] Sent: 05 January 2002 18:35 To: [EMAIL PROTECTED] Subject: SQL Server 2000 Hi.. Is there any painless way or good documentation on how to convert a database from Micro$soft $QL 2000 into MySql? Thanks in advance for any directions you can point me to. Stan - 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[2]: Innodb/Replication problems.
Hello Heikki, Saturday, January 05, 2002, 11:55:02 PM, you wrote: Hello mysql, I'm using mysql 3.23.47 with Innodb and trying to play around with replication. The replication options are default. I got one table content occasionally deleted on slave, and note what HT Who deleted the table contents? You? Yes. I did it. this did not stop the replication: The inserts are successfully passed, therefore the updates to nonexistent rows simply ignored. HT But MySQL passes complete SQL statements to the slave. It is no error if an HT update does not update any rows. I do not believe that MySQL checks that the HT master updated as many rows as the slave. May be this is the problem, because for example for insert mysql check if it was able to insert data (no duplicates or what ever) but this does not work with updates. I remember then I tried this half a year ago with myisam, the behavior was to print an error and stop. Well probably I'm a bit mistaken - the error is checked for insert because duplicate key error is an error, therefore the update which does not update anything is quite OK. -- Best regards, Petermailto:[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
repost - compilile problems on solaris 2.6
Hi! fil == fil krohnengold [EMAIL PROTECTED] writes: fil [gcc version 2.95.2; mysql 3.23.47] cut fil ctype.lo dbug.lo -lz -lcrypt -lgen -lsocket -lnsl -lm fil rm -fr .libs/libmysqlclient.la .libs/libmysqlclient.* fil .libs/libmysqlclient.* fil fil ... then I'm stuck there for hours. Files called sh${PID} are fil being created and removed in /tmp with this as their contents: fil fil int main() { return 0; } fil This is an indication that something is not completely right with your system; You should try to spend some time to find out what is wrong, as this could have serious effects on other programs than MySQL. Are you using an NFS disk? If yes, try to do the compilation on a normal disk. Can you from 'ps' see what command are executing ? Are you using gnu make; If you are using Solaris make, then you can get into strange problems like this. fil Here's the last 200 lines from config.log, as requested by fil sinisa: This doesn't help, as the problem isn't that your configure failed. Regards, Monty -- For technical support contracts, goto https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Michael Widenius [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, CTO /_/ /_/\_, /___/\___\_\___/ Helsinki, Finland ___/ www.mysql.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
Using MYSQL and PHP With Vitual Apache Servers ?
Hi, I have a redhat server, running apache 1.3.20. The server is running a couple of virtual servers for different websites. I now wish to add a few new virtual servers/domains to the machine. However (here is the twist) these sites will need to use a different mysql schema each and have some of the content generated with php based on the data from the different mysql databases. Is this possible ??? if so what is needed to configure this setup (just brief), and I would be very interested in hearing from someone who is running virtual servers with each site using a different mysql database. Thanks, Matt. - 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
Number of mysqld
Hello, I have a small Linux server on my company (Pentium-133 with 16 RAM) and recently i installed mysql-3.23.37 for collect statistics from proxy. But then i look at ps out, i saw this: ps -axl|grep mysql VSZ RSS ... 17840 116453 SW ? 0:00 [safe_mysql ... 10324 4300 12d3c0 S? 0:04 /usr/sbin/mysqld ... 10324 4300 12d96f S? 0:00 /usr/sbin/mysqld ... 10324 4300 106b9e S? 0:00 /usr/sbin/mysqld ... 10324 4300 106b9e S? 0:00 /usr/sbin/mysqld 4 mysqld processes for only one user task! May be anyone know, Is it possible to reduce number of mysqld? I could not find information about this in the manual. Thanks, Sergey Potapov - 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
Replication security problem
Hi I implemented replication in my databases, and I can see a security problem. When you configure the slave you must write the replication user password in the my.cnf file. If somebody access this file will see the password and the user name, so if he can and want he will get access to the master using the replication user and can do changes in some databases (not in mysql database). Is this true? Is there a way to solve this (encrypt the password in the my.cnf or another way)? Fernando Andrés Cosa - 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: Number of mysqld
Sergey Potapov a écrit : Hello, I have a small Linux server on my company (Pentium-133 with 16 RAM) and recently i installed mysql-3.23.37 for collect statistics from proxy. But then i look at ps out, i saw this: ps -axl|grep mysql VSZ RSS ... 17840 116453 SW ? 0:00 [safe_mysql ... 10324 4300 12d3c0 S? 0:04 /usr/sbin/mysqld ... 10324 4300 12d96f S? 0:00 /usr/sbin/mysqld ... 10324 4300 106b9e S? 0:00 /usr/sbin/mysqld ... 10324 4300 106b9e S? 0:00 /usr/sbin/mysqld 4 mysqld processes for only one user task! May be anyone know, Is it possible to reduce number of mysqld? I could not find information about this in the manual. Thanks, Sergey Potapov - 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 Hi, mysqld is single-process/multi-thread. What you see are 4 threads, ps on Linux doen not differenciate between threads and processes. For more details on these threads, you can look at the manual: http://www.mysql.com/doc/M/y/MySQL_threads.html Hope this helps -- Joseph Bueno NetClub/Trader.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 : 3 or 4?
Hi John I've been using 3.x for over 18 months now, i upgrade my dev. system to the latest release as soon as it's available. However, i deploy projects to many different servers usually running old versions of 3.x and i've been caught out a couple of times; it's not a pleasant feeling when you have to re-code for the lowest common denominator :( The last time this happened i had to re-code for loss of temporary memory tables and user defined variables functionality - that really sucked! :) Anyway, if you run your own servers then it may not be a problem because you can keep pace with the upgades. As for 4.x i would start running it on an alternate port and fully migrate to it once sub-selects (that's the one i've been waiting for) are available in version 4.1 Either way, PAM is an awesome combination you'll love more and more as you get used to it :) Regards Girish - Original Message - From: John Snippe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 05, 2002 8:36 PM Subject: Re: mySQL : 3 or 4? On 1/5/02, regarding Re: mySQL : 3 or 4? , Girish Nath wrote: Hi If i were in your position i would use 3.23.x mainly because that's what the majority of hosting facilities use as their platform right now. It's a pain to develop something with all the latest and greatest features then realise you have to deploy your app on something not so upto date, if you see what i mean. If hosting is not an issue, would that change your decision at all? I am running my own servers here, and do my own hosting, so for me that is not a relevant part of the equation. OTOH, one of the reasons I am getting into AMP is to diversify so maybe the above is not fully correct. Thanks, Girish. A valid criterion. -- Later... JS - 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: Changing Ports
Hi If you want to change port from eg 3306 to 3308 then edit the [mysqld] section in the my.ini file in \winnt to : [mysqld] port=3308 Save the file, then restart the service. To check if the port opened succesfully do netstat -a in the command prompt. If that doesn't work, then email me back. Best Regards Girish - Original Message - From: Paul Damstra [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 05, 2002 10:56 PM Subject: Changing Ports I am running MySQL (v 3.23.43) on a Win NT server and require an applet to communicate with the database. Unfortunately the ISP has blocked all access to port 3306 at the router, which I think is the cause for my not being able to load any data in the applet (Meanwhile, beans served up through Tomcat are processed with no problems.). My question is, how can I change the port MySQL listens on? Is there a way other than recompiling the source files? I have tried adding a startup parameter to the MySQL service (-P option), I have tried addressing a new port in the my.cnf file, I have even tried changing the port through MySQLAdmin, all with no luck. I have gone through the manual, but the information here doesn't really help much in this regards. Any help would be greatly appreciated. Many thanks, Paul - 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: Using MYSQL and PHP With Vitual Apache Servers ?
Matthew: There is no 'twist' here ... once your Apache server is configured to support MySQL and PHP, just design the appropriate schema for each website and create a database for each site requiring MySQL support. I would suggest you pick up one (or more) of the books available on MySQL and PHP programming ... there are a number from publishers like New Riders, O'Reilly, WROX, etc. Gerald Jensen - Original Message - From: Matthew Darcy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, January 06, 2002 7:06 AM Subject: Using MYSQL and PHP With Vitual Apache Servers ? Hi, I have a redhat server, running apache 1.3.20. The server is running a couple of virtual servers for different websites. I now wish to add a few new virtual servers/domains to the machine. However (here is the twist) these sites will need to use a different mysql schema each and have some of the content generated with php based on the data from the different mysql databases. Is this possible ??? if so what is needed to configure this setup (just brief), and I would be very interested in hearing from someone who is running virtual servers with each site using a different mysql database. Thanks, Matt. - 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: Using MYSQL and PHP With Vitual Apache Servers ?
* Matthew Darcy I have a redhat server, running apache 1.3.20. The server is running a couple of virtual servers for different websites. I now wish to add a few new virtual servers/domains to the machine. However (here is the twist) these sites will need to use a different mysql schema each and have some of the content generated with php based on the data from the different mysql databases. Is this possible ??? Yes, why should it not be possible? (I may be misunderstanding your description of the situation.) if so what is needed to configure this setup (just brief), and I would be very interested in hearing from someone who is running virtual servers with each site using a different mysql database. Each site use different php scripts, each script can connect to any server/database, even to multiple servers/databases. -- Roger - 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: SQL Server 2000
You can't try http://www.appsolute.nl/heraut/ ... it is a restricted site. Must be a commercial package or subscription service. Gerald Jensen - Original Message - From: Norman Khine [EMAIL PROTECTED] To: Stan Lester [EMAIL PROTECTED] Cc: Mysql [EMAIL PROTECTED] Sent: Sunday, January 06, 2002 3:06 AM Subject: RE: SQL Server 2000 try http://www.appsolute.nl/heraut/ you can use importerscript to run db_dump.sql from you M$ SQL Server into dezign and then change the db type to mysql. hth Norman -Original Message- From: Stan Lester [mailto:[EMAIL PROTECTED]] Sent: 05 January 2002 18:35 To: [EMAIL PROTECTED] Subject: SQL Server 2000 Hi.. Is there any painless way or good documentation on how to convert a database from Micro$soft $QL 2000 into MySql? Thanks in advance for any directions you can point me to. Stan - 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: Using MYSQL and PHP With Vitual Apache Servers ?
Why not just create separate databases for each virtual server? It sounds like a perfect situation to create multiple databases, as databases do provide data separation... mysql create database Virtual1; mysql create database Virtual2; mysql create database Virtual3; mysql create database Virtual4; mysql show databases; +--+ | Database | +--+ | Virtual1 | | Virtual2 | | Virtual3 | | Virtual4 | +--+ And then in the PHP code for each website, you connect to the appropriate database. Say for website Virtual2: $dbh = mysql_connect(localhost,user,pass); mysql_select_db('Virtual2'); ... Access schema for website Virtual2 ... http://www.mysql.com/doc/C/R/CREATE_DATABASE.html http://www.php.net/manual/en/function.mysql-select-db.php Good luck. On Sun, 6 Jan 2002, Matthew Darcy wrote: I have a redhat server, running apache 1.3.20. The server is running a couple of virtual servers for different websites. I now wish to add a few new virtual servers/domains to the machine. However (here is the twist) these sites will need to use a different mysql schema each and have some of the content generated with php based on the data from the different mysql databases. Is this possible ??? if so what is needed to configure this setup (just brief), and I would be very interested in hearing from someone who is running virtual servers with each site using a different mysql database. Thanks, Matt. - 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
FW: Using MYSQL and PHP With Vitual Apache Servers ?
Sorry, I forwarded this worng the first time... --Brian -Original Message- From: Brian E. Beck [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 06, 2002 8:17 AM To: j.urban Subject: RE: Using MYSQL and PHP With Vitual Apache Servers ? In fact, I run 30 virtual servers, and 10 of them have their own databases on the same MySQL server. I set up a different database for each one, and give each one a username and password that only has access to each one, (I even put a copy og phpMyAdmin on each site, configured to admin only that database!) Works great. --Brian -Original Message- From: j.urban [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 06, 2002 7:44 AM To: Matthew Darcy Cc: [EMAIL PROTECTED] Subject: Re: Using MYSQL and PHP With Vitual Apache Servers ? Why not just create separate databases for each virtual server? It sounds like a perfect situation to create multiple databases, as databases do provide data separation... mysql create database Virtual1; mysql create database Virtual2; mysql create database Virtual3; mysql create database Virtual4; mysql show databases; +--+ | Database | +--+ | Virtual1 | | Virtual2 | | Virtual3 | | Virtual4 | +--+ And then in the PHP code for each website, you connect to the appropriate database. Say for website Virtual2: $dbh = mysql_connect(localhost,user,pass); mysql_select_db('Virtual2'); ... Access schema for website Virtual2 ... http://www.mysql.com/doc/C/R/CREATE_DATABASE.html http://www.php.net/manual/en/function.mysql-select-db.php Good luck. On Sun, 6 Jan 2002, Matthew Darcy wrote: I have a redhat server, running apache 1.3.20. The server is running a couple of virtual servers for different websites. I now wish to add a few new virtual servers/domains to the machine. However (here is the twist) these sites will need to use a different mysql schema each and have some of the content generated with php based on the data from the different mysql databases. Is this possible ??? if so what is needed to configure this setup (just brief), and I would be very interested in hearing from someone who is running virtual servers with each site using a different mysql database. Thanks, Matt. - 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
Strange LOAD DATA problem
I have a file (data.txt) which contains the data: ELITEô85.ôQô4 DaysôLilleshallôChris IMPô75.ôQôTuesFriôLilleshallôSue LEFTô0.ôôôLeftô PRESCô24.ôTôOne DayôWrekinôArleen RECô27.ôQôTuesôWrekinôTony I use the LOAD DATA DDL statement: LOAD DATA LOCAL INFILE data.txt INTO TABLE squad FIELDS TERMINATED BY ô LINES TERMINATED BY \n; But when I select * from squad MySQL returns: mysql select * from squad; +--+---+--+--++-+ | Squad_id | Fee | Per | Days | Location | Coach | +--+---+--+--++-+ |LITE| 85.00 | Q| 4 Days | Lilleshall | Chris | | 75.00 | Q| TuesFri | Lilleshall | Sue | | 0.00 | | | Left | |PRESC| 24.00 | T| One Day | Wrekin | Arleen | REC | 27.00 | Q| Tues | Wrekin | Tony| +--+---+--+--++-+ 5 rows in set (0.00 sec) Notice how the table (more specifically the data) is malformmed even thought the data in the file is visibly correct. Is there anything I can do to make sure that the data in the file is imported successfully. Also I use the field delimiter ô (ALT+147) because the data MAY contain your more standard delimiter , (comma). Any ideas NOTE: The table was created using CREATE TABLE squad ( Squad_id VARCHAR(255), Fee DECIMAL(20,2), Per VARCHAR(255), Days VARCHAR(255), Location VARCHAR(255), Coach VARCHAR(255) ); Both client and server ar on the same machine (running on WinXP) Thanks lots David Ayliffe - 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
user / pwd access to db driven website
HI all, I would be extremely appreciative with solution suggestions to the problem I am having. I really could use some help right now !! I am trying to get a database driven website up and running that has some amount of security on it (which i intend to make progresively better). It needs user/pwd access to a database of info, after a subscription fee is paid. Currently I am having trouble setting up the basic structure. By the way this is a starup company, and only 5- 10 subscriptions would fund much better software / hardware / server for the site. So my goal is to set up something inexpensive to get those 5 or so subscriptions. Attempt No. 1: I setup a test site ( virtual hosting I think it is called) that utilizes perl ms access. It works oK except I didn't get the user/pwd thing working. It has pwd protected directories - however they told me queries will not work with the pwd protected directory insalled. Technical support is very slow in responding. And I didn't figure out how to provide the needed security mentioned above. Currently I have been reading about mysql and just installed it on windows 98. I am open to changing over to linux based systems. However I would like to create the tempory site to get a few subsciptions prior to forking out the funds. So finally now that you guys know my situation can you please make some suggestions as to how to get the temporary site up ( to get 5 subscriptions or so) and I think I coudl painfully, over time, work on a site that could handle much more. Information: The database would be text only, less than 1 GB ! Right now I think it is at 5 MB but will increase. I am familar with perl 5.6 and ms access. Budget: Shoe string budget for now. :) I would greatly appreciate assistance I am sure many of you dealt with this type of situation before. = Regards, Investorclb __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ - 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: Strange LOAD DATA problem
Yeah useful but that still doesn't solve my problem -Original Message- From: Maciek Dobrzanski [mailto:[EMAIL PROTECTED]] Sent: 06 January 2002 17:43 To: David Ayliffe; 'MySQL' Subject: Re: Strange LOAD DATA problem Also I use the field delimiter ô (ALT+147) because the data MAY contain your more standard delimiter , (comma). You may use any string as the field delimiter (i.e. '~EOF~', '#END#'). - 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: Strange LOAD DATA problem
At 17:36 + 1/6/02, David Ayliffe wrote: I have a file (data.txt) which contains the data: ELITEô85.ôQô4 DaysôLilleshallôChris IMPô75.ôQôTuesFriôLilleshallôSue LEFTô0.ôôôLeftô PRESCô24.ôTôOne DayôWrekinôArleen RECô27.ôQôTuesôWrekinôTony I use the LOAD DATA DDL statement: LOAD DATA LOCAL INFILE data.txt INTO TABLE squad FIELDS TERMINATED BY ô LINES TERMINATED BY \n; But when I select * from squad MySQL returns: mysql select * from squad; +--+---+--+--++-+ | Squad_id | Fee | Per | Days | Location | Coach | +--+---+--+--++-+ |LITE| 85.00 | Q| 4 Days | Lilleshall | Chris | | 75.00 | Q| TuesFri | Lilleshall | Sue | | 0.00 | | | Left | |PRESC| 24.00 | T| One Day | Wrekin | Arleen | REC | 27.00 | Q| Tues | Wrekin | Tony| +--+---+--+--++-+ 5 rows in set (0.00 sec) Notice how the table (more specifically the data) is malformmed even thought the data in the file is visibly correct. Is there anything I can do to make sure that the data in the file is imported successfully. Also I use the field delimiter ô (ALT+147) because the data MAY contain your more standard delimiter , (comma). When I see this, it's typically because I've gotten carriage returns (\r) into the file. I'd take a look at the file with a utility that shows every character (like a hex dumper or something similar) to see what's really in your file. - 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: Using MYSQL and PHP With Vitual Apache Servers ?
this is a perfect explination, I was concerned about the same webserver (split into virtual) accessing different databases. Out of interest can anyone think of ANY problems this virtual setup may cause ? ie memory, transaction time, dns even, just anything at all so I am trying to evaluate possiblities for different ideas. Thanks, Matt. PS is anyone interested in working on any projects, I am new to both PHP and MYSQL and I am trying my hand at some new projects, I am quite competant in Oracle, C++, VB, Unix so it is not quite the same as working with a non programmer. If you are interested drop me a personal mail. -Original Message- From: j.urban [mailto:[EMAIL PROTECTED]] Sent: 06 January 2002 15:44 To: Matthew Darcy Cc: [EMAIL PROTECTED] Subject: Re: Using MYSQL and PHP With Vitual Apache Servers ? Why not just create separate databases for each virtual server? It sounds like a perfect situation to create multiple databases, as databases do provide data separation... mysql create database Virtual1; mysql create database Virtual2; mysql create database Virtual3; mysql create database Virtual4; mysql show databases; +--+ | Database | +--+ | Virtual1 | | Virtual2 | | Virtual3 | | Virtual4 | +--+ And then in the PHP code for each website, you connect to the appropriate database. Say for website Virtual2: $dbh = mysql_connect(localhost,user,pass); mysql_select_db('Virtual2'); ... Access schema for website Virtual2 ... http://www.mysql.com/doc/C/R/CREATE_DATABASE.html http://www.php.net/manual/en/function.mysql-select-db.php Good luck. On Sun, 6 Jan 2002, Matthew Darcy wrote: I have a redhat server, running apache 1.3.20. The server is running a couple of virtual servers for different websites. I now wish to add a few new virtual servers/domains to the machine. However (here is the twist) these sites will need to use a different mysql schema each and have some of the content generated with php based on the data from the different mysql databases. Is this possible ??? if so what is needed to configure this setup (just brief), and I would be very interested in hearing from someone who is running virtual servers with each site using a different mysql database. Thanks, Matt. - 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
Hi Folks!
I have a problem with my Website. I want to list only 25 results of a db query. When the user klicks on Second Page he should see the next 25 results and so on. How can I do that? Thx for replies. Sebastian - 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: Hi Folks!
Sebastian Grewe wrote: I have a problem with my Website. I want to list only 25 results of a db query. When the user klicks on Second Page he should see the next 25 results and so on. How can I do that? Thx for replies. Sebastian - Sebastian: The MySQL end of it is the LIMIT clause. But, you'll need to do some math manipulation within your web application for creating forward and backward links, etc. for navigating through the result set. This is more a php3/cgi question than MySQL. Regards, Van -- = Linux rocks!!! http://www.dedserius.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
mysqlgui - my.cnf or my.ini
hi! i'm running 3.23.47 w/ mysql gui1.7.5-2 on win2k to config innodb, i edited the my.ini (with some help from heikki...thanks!) and learned on win my.cnf and my.ini cannot co-exist. now i'm ready to install mysqlgui to set up my admin, users, etc... my question is: can i add the included mysqlgui parameters to my.ini in WINNT? will this work? it only mentions adding to c:\my.cnf (which i don't have, since it cant use both) thanks in advance, jds - 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
Dang, what about libmysqlclient.so for the Binary Distribution of Max 4.0.1 ?
What do I do to get libmysqlclient.so for my binary distribution of Mysql max 4.0.1 ? Install bitkeeper, get the source, build it ??? It's not included in any download already ? ( Not the one I got, I just have a libmysqlclient.a ) -AEF -- When I took off my space suit helmet, I let out a sigh. At least that's what I told the martians... - Jack Handy table and database sql 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
Select with dbi perl??? Help please!
Hi! I have the following script to be executed via post from a web-form; the var. Pin, msisd and knd are given by the form but however, the script is not working. I always get no results as if there are no matches, but this isnt right! This is regardless which entries i submit with the form! Any ideas to fix the problem? Thanks a lot in advance Regards Sascha Kettner #!/usr/bin/perl use DBI(); # # Get form Data # # parse_form; # Script Variables # $input{knd} = ; $input{pin} = ; $input{msisdn} = ; # What to do on submit # dojob; ## # Lets have a look at the db # ## sub dojob { # Now retrieve data from the table. my $dbh = DBI-connect(DBI:mysql:database=prepaid;host=localhost, root, sascha28, {'RaiseError' = 1}); my $sth = $dbh-prepare(SELECT * FROM pins WHERE pin LIKE '$input{pin}' OR msisdn LIKE '$input{msisdn}' OR knd LIKE '$input{knd}'); print EOF; Content-type: text/html html !--# Include Virtual=/blank.html-- head titleMAKEPINS/title meta http-equiv=refresh content=10;url=https:/index.html /head body h1 align=centerSuche Ausgeführt/h1hrbrbr /body /html EOF $sth-execute(); while (my $ref = $sth-fetchrow_hashref()) { print Eintrag gefunden: pin = $ref-{'pin'}, msisdn = $ref-{'msisdn'}\n, knd = $ref-{'knd'}\n\n; } $sth-finish(); # Disconnect from the database. $dbh-disconnect(); exit; } ## # Get form data function # ## sub parse_form { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); if (length($buffer) 5) { $buffer = $ENV{QUERY_STRING}; } @pairs = split(//, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack(C, hex($1))/eg; $input{$name} = $value; } } ### # The end # ### - 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 mysql-unsubscribe-##L=##[EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
one query work, but other don't work
SELECT COUNT(DISTINCT ip), COUNT(*), CONCAT(shref,href) FROM hit GROUP BY 3 It is work, result is table with many record. SELECT COUNT(*), CONCAT(shref, href) FROM hit GROUP BY 2 But this query don't work. # # Table structure for table 'hit' # CREATE TABLE hit ( owner_id int(10) unsigned NOT NULL default '0', it_date datetime default NULL, href varchar(64) default NULL, ip varchar(16) default NULL, os varchar(32) default NULL, browser varchar(32) default NULL, version varchar(32) default NULL, x int(10) unsigned default NULL, y int(10) unsigned default NULL, depth int(10) unsigned default NULL, cookie enum('0','1') default '0', java enum('0','1') default '0', page varchar(255) default NULL, frame enum('0','1') default '0', js char(3) default '0', shref varchar(255) default NULL, spage varchar(255) default NULL ) TYPE=MyISAM; -- [òÁÚÒÁÂÏÔËÁ ×ÅÂ-ÓÁÊÔÏ× É ÐÒÅÚÅÎÔÁÃÉÊ] [óÏÚÄÁÎÉÅ ÌÏËÁÌØÎÙÈ ÓÅÔÅÊ É ÕÓÔÁÎÏ×ËÁ ÍÉÎÉáôó] http://itsoft.ru, (095) 916-89-51, 916-89-63, 8-902-631-54-19 ó ÎÁÉÌÕÞÛÉÍÉ ÐÏÖÅÌÁÎÉÑÍÉ, éÇÏÒØ ôÁÒÁÓÏ× mailto:[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
Connecting to MySql
Hi, I cant connect to a MySql Database form a Windows PC, I get Host ... is not allowed to connect to this MySQL server and in the MySql manual I found the following solution but I dont know how to do it. I am an novice in MySql. If anyone can make tell me the commands I will be very happy. From the manual--- If you get the following error when you try to connect from a different host than the one on which the MySQL server is running, then there is no row in the user table that matches that host: Host ... is not allowed to connect to this MySQL server You can fix this by using the command-line tool mysql (on the server host!) to add a row tothe user, db, or host table for the user/hostname combination from which you are trying to connect and then execute mysqladmin flush-privileges. If you are not running MySQL Version 3.22 and you don't know the IP number or hostname of the machine from which you are connecting, you should put an entry with '%' as the Host column value in the user table and restart mysqld with the --log option on the server machine. After trying to connect from the client machine, the information in the MySQL log will indicate how you really did connect. (Then replace the '%' in the user table entry with the actual hostname that shows up in the log. Otherwise, you'll have a system that is insecure.) Another reason for this error on Linux is that you are using a binary MySQL version that is compiled with a different glibc version than the one you are using. In this case you should either upgrade your OS/glibc or download the source MySQL version and compile this yourself. A source RPM is normally trivial to compile and install, so this isn't a big problem. Regards Tue - 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
Okay fixed it the hard way - FYI Re: Dang, what about libmysqlclient.so for the Binary Distribution of Max 4.0.1 ?
I went ahead and did the Bitkeeper thing. Again, the documentation was not very exacting: shell bk clone bk://work.mysql.com:7001 mysql-4.0 do rather: bk clone bk://work.mysql.com:7001 mysql-max-4.0 shell cd mysql shell bk -r edit shell aclocal; autoheader; autoconf; automake; shell ./configure # Add your favorite options here shell make cd mysql-max-4.0 Do as above. BUT BEFORE ./configure cd innodb aclocal; autoheader; autoconf; automake; ./configure Then cd .. and continue ./configure # Add your favorite options here make. After I did ./configure -with-shared and then did a make, I had libmysqlclient.so* in some hidden type directory under libmysql/.libs/ in here. I copied these to /usr/lib and away I went. Kylix can now use the Binary distribution since I have the right libmysqlclient.so. I did not install the whole thing from source, just the libs I needed. Is it just me or has the whole www.mysql.com documentation and process for getting up and running taken a terrible turn for the worse ? Is someone assigned to issues regarding Nice end-user experience ? There is a lot of content, just slight wrong here and there, and somewhat incomplete. Say, a whole day of someone's time on this can make a world of difference. ? -AEF On Sunday 06 January 2002 21:38, Allen wrote: What do I do to get libmysqlclient.so for my binary distribution of Mysql max 4.0.1 ? Install bitkeeper, get the source, build it ??? It's not included in any download already ? ( Not the one I got, I just have a libmysqlclient.a ) -AEF -- When I took off my space suit helmet, I let out a sigh. At least that's what I told the martians... - Jack Handy - 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: Connecting to MySql
On Mon, 7 Jan 2002 00:03:20 +0100, Tue Hellstern wrote: I cant connect to a MySql Database form a Windows PC, I get Host ... is not allowed to connect to this MySQL server and in the MySql manual I found the following solution but I dont know how to do it. I am an novice in MySql. If anyone can make tell me the commands I will be very happy. In order to correct this problem, you or an administrator must be able to log into mysql as root. Then it is only necessary to issue a GRANT PRIVILEGES query such as: GRANT ALL PRIVILEGES ON *.* TO tue@% IDENTIFIED BY 'apassword' WITH GRANT OPTION; The above would permit user tue to log in from any location (%) with all privileges including the ability to grant privileges to others. Regards, Doug - 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: Connecting to MySql
GRANT ALL PRIVILEGES ON *.* TO tue@% IDENTIFIED BY 'apassword' WITH GRANT OPTION; Ah but that doesn't work this is what worries me because I have a book on mysql that uses syntax like this and it generates an error on my system. This is a Red Hat 7.2 system, stock with Red Hat distributed upgrades. For example: [root@crab root]# uname -a Linux crab.ocean.yonderway.com 2.4.9-13 #1 Tue Oct 30 19:32:27 EST 2001 i686 unknown [root@crab root]# rpm -q mysql mysql-3.23.41-1 [root@crab root]# mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 55 to server version: 3.23.41 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql grant all privileges on *.* to foo@% identified by 'foobar' with grant option; ERROR 1064: You have an error in your SQL syntax near '% identified by 'foobar' with grant option' at line 1 mysql - 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: Connecting to MySql
Put double quotes around % so that foo@% On Sun, 6 Jan 2002 18:31:00 -0500, Christian J Hedemark wrote: mysql grant all privileges on *.* to foo@% identified by 'foobar' with grant option; ERROR 1064: You have an error in your SQL syntax near '% identified by 'foobar' with grant option' at line 1 mysql - 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
Trying to get website set up
I have apache running on a windows 98 machine and I just installed mysql on it. Also I use perl 5.6. However this is for local testing. I need to go online with my website soon. I was wondering if it is possible to use this setup to get a mysql db driven website going, then send it to a linux server b/c I don't know of any windows servers running mysql.. Or, will this cause problems... I will have to learn more about linux !! thanks in advance = Regards, Investorclb __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ - 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: SQL Server 2000
Yes it is, at $139 I think it is a supper apps, if you are not sure try the evaluation version -Original Message- From: Gerald R. Jensen [mailto:[EMAIL PROTECTED]] Sent: 06 January 2002 15:37 To: Norman Khine; Stan Lester Cc: Mysql Subject: Re: SQL Server 2000 You can't try http://www.appsolute.nl/heraut/ ... it is a restricted site. Must be a commercial package or subscription service. Gerald Jensen - Original Message - From: Norman Khine [EMAIL PROTECTED] To: Stan Lester [EMAIL PROTECTED] Cc: Mysql [EMAIL PROTECTED] Sent: Sunday, January 06, 2002 3:06 AM Subject: RE: SQL Server 2000 try http://www.appsolute.nl/heraut/ you can use importerscript to run db_dump.sql from you M$ SQL Server into dezign and then change the db type to mysql. hth Norman -Original Message- From: Stan Lester [mailto:[EMAIL PROTECTED]] Sent: 05 January 2002 18:35 To: [EMAIL PROTECTED] Subject: SQL Server 2000 Hi.. Is there any painless way or good documentation on how to convert a database from Micro$soft $QL 2000 into MySql? Thanks in advance for any directions you can point me to. Stan - 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 - 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
Slow down processing
Hi all What is the maximum records can hold in a single table in mysql. I am doing a file upload from text file to a table. The records are seperated using year,month,date. I have 2 years of data to be uploaded. After I did 10mb of file (2 months) where in my single table recordcount was reached 15000 records, It slow down the process of Insert/Update/Delete queries. To upload the entire month, normally (when the database is empty) it takes approx 1 hour. After 3 months of file upload, now the process time for the entire month take 4 hours and its growing as well. How do i increase the performance. Anybody can give me the best possible idea to increase the performance. My application is running on VB. Thanx for all your help Regards Prabu - 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
FW: Slow down processing
Hi all What is the maximum records can hold in a single table in mysql. I am doing a file upload from text file to a table. The records are seperated using year,month,date. I have 2 years of data to be uploaded. After I did 2 months where in my single table recordcount was reached 128500 records, It slow down the process of Insert/Update/Delete queries. To upload the entire month, normally (when the database is empty) it takes approx 1 hour. After 3 months of file upload, now the process time for the entire month takes 4 hours and its growing as well. How do i increase the performance. Anybody can give me the best possible idea to increase the performance. My application is running on VB. Thanx for all your help Regards Prabu - 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
Join Query Help
Hello, I'm back to the list after two weeks off. I have a little problem, the email may seem long but it's clearly explained step by step what I've done... I have a table that have artists playing at events. It's called eventartists. One artist can play alone, or with another artist. Because the number of artists playing together is limited (3 max) I don't want to build another table for them since I have plenty of links like this. mysql create table eventartists( - eaEvtID smallint unsigned not null, - eaDnID smallint unsigned not null, - eaDn2ID smallint unsigned, - unique index(eaEvtID,eaDnID,eaDn2ID), - unique index(eaDnID, eaEvtID), - unique index(eaDn2ID, eaEvtID)); Query OK, 0 rows affected (0.02 sec) Then I have my artists table called djnames with some info mysql create table djnames( - dnID smallint unsigned not null auto_increment, - dnName varchar(20) not null, - primary key(dnID)); Query OK, 0 rows affected (0.02 sec) then let's insert some fake data... let's fill some djs first: mysql insert into djnames(dnName) values(dj a); Query OK, 1 row affected (0.01 sec) mysql insert into djnames(dnName) values(dj b); Query OK, 1 row affected (0.00 sec) mysql insert into djnames(dnName) values(dj c); Query OK, 1 row affected (0.00 sec) mysql insert into djnames(dnName) values(dj d); Query OK, 1 row affected (0.00 sec) mysql insert into djnames(dnName) values(dj e); Query OK, 1 row affected (0.01 sec) then let's say event #1 has dj a, djb playing with dj c and dj d and e playing alone. mysql insert into eventartists(eaEvtID,eaDnID) values(1,1); Query OK, 1 row affected (0.00 sec) mysql insert into eventartists(eaEvtID,eaDnID) values(1,4); Query OK, 1 row affected (0.00 sec) mysql insert into eventartists(eaEvtID,eaDnID) values(1,5); Query OK, 1 row affected (0.00 sec) mysql insert into eventartists(eaEvtID,eaDnID,eaDn2ID) values(1,2,3); Query OK, 1 row affected (0.00 sec) mysql select eaDnID,eaDn2ID from eventartists; ++-+ | eaDnID | eaDn2ID | ++-+ | 1 |NULL | | 2 | 3 | | 4 |NULL | | 5 |NULL | ++-+ 4 rows in set (0.00 sec) So this way it's easy to see that dj b and dj c are playing together... but when putting the names in it I can't find how.. mysql select dnName from djnames,eventartists where eaDnID = dnID or eaDn2ID=dn ID; ++ | dnName | ++ | dj a | | dj d | | dj e | | dj b | | dj c | ++ 5 rows in set (0.02 sec) this way i can't see when there are two djs together.. Any idea how to do so.. or how I can modify my tables so that it does so? I can see if some artists are playing together with something like: mysql select dnName from djnames,eventartists where (eaDnID = dnID or eaDn2ID=d nID) and eaDn2ID is not null; ++ | dnName | ++ | dj b | | dj c | ++ 2 rows in set (0.00 sec) I'm off to bed, pleaseee help me on this one, I can't finish my event calendar without dealing with those.. Regards, Etienne - 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
Question: REPLACE function
Hello I have a question about the REPLACE string function, not the REPLACE SQL command. According to the documentation, REPLACE works as follows: == REPLACE(str,from_str,to_str) Returns the string str with all all occurrences of the string from_str replaced by the string to_str mysql select REPLACE('www.mysql.com', 'w', 'Ww'); - 'WwWwWw.mysql.com' == Is there any way to make this REPLACE function match regular expressions rather than substrings? Lets say, if you wanted to remove all non-alhpabetic characters from a column, you could do: select REPLACE(Address, '[^A-Za-z]', ''); so that '123 Somestreet' becomed 'Somestreet'? The real usefullness of this, for me, is to be able to group rows together by similarities in their columns. For example: select REPLACE(Address, '[^A-Za-z]', '') as StreetName, COUNT(*) from Addresses group by StreetName; which would return something like this: +-+--+ | Street Name | COUNT(*) | +-+--+ | Somestreet | 5| | Apple Ct| 2| +-+--+ Thanks in advance for any help. At the worst case, I guess this is a request for a feature. Tim -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Tim Gustafson - [EMAIL PROTECTED] http://www.falconsoft.com/ -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Share your knowledge - it's a way to achieve immortality. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - 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
synopsis of the problem (one line)
Description: How-To-Repeat: Fix: Submitter-Id: submitter ID Originator:root Organization: MySQL support: [none | licence | email support | extended email support ] Synopsis: Severity: Priority: Category: mysql Class: Release: mysql-4.0.1-alpha (Official MySQL binary) Environment: System: Linux linux02.linux02.com 2.2.17-8wl2 #1 Sun Jan 14 22:01:31 KST 2001 i686 unknown Architecture: i686 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 2731 (Red Hat Linux 7.0) Compilation info: CC='gcc' CFLAGS='-O3 -mpentium ' CXX='gcc' CXXFLAGS='-O3 -mpentium -felide-constructors' LDFLAGS='-static' LIBC: lrwxrwxrwx1 root root 11 Jan 6 07:51 /lib/libc.so.6 - libc-2.2.so -rwxr-xr-x1 root root 4761074 Dec 15 2000 /lib/libc-2.2.so -rw-r--r--1 root root 22855536 Dec 15 2000 /usr/lib/libc.a -rw-r--r--1 root root 178 Dec 15 2000 /usr/lib/libc.so lrwxrwxrwx1 root root 10 Jan 6 08:05 /usr/lib/libc-client.a - c-client.a Configure command: ./configure --prefix=/usr/local/mysql '--with-comment=Official MySQL binary' --with-extra-charsets=complex --with-server-suffix= --enable-thread-safe-client --enable-assembler --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --disable-shared - 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: Join Query Help
Hi, The below mentioned query, select eventartists.eaDnID,djnames.dnName,eventartists.eaDn2ID from eventartists,djnames where djnames.dnID = eventartists.eaDnID; gives the following result. +++-+ | eaDnID | dnName | eaDn2ID | +++-+ | 1 | dj a |NULL | | 2 | dj b | 3 | | 4 | dj d |NULL | | 5 | dj e |NULL | +++-+ 4 rows in set (0.00 sec) with which we can come to know that dj b is performing with one other artist and whose ID is 3. -Original Message- From: Etienne [mailto:[EMAIL PROTECTED]] Sent: Monday, January 07, 2002 9:14 AM To: [EMAIL PROTECTED] Subject: Join Query Help Hello, I'm back to the list after two weeks off. I have a little problem, the email may seem long but it's clearly explained step by step what I've done... I have a table that have artists playing at events. It's called eventartists. One artist can play alone, or with another artist. Because the number of artists playing together is limited (3 max) I don't want to build another table for them since I have plenty of links like this. mysql create table eventartists( - eaEvtID smallint unsigned not null, - eaDnID smallint unsigned not null, - eaDn2ID smallint unsigned, - unique index(eaEvtID,eaDnID,eaDn2ID), - unique index(eaDnID, eaEvtID), - unique index(eaDn2ID, eaEvtID)); Query OK, 0 rows affected (0.02 sec) Then I have my artists table called djnames with some info mysql create table djnames( - dnID smallint unsigned not null auto_increment, - dnName varchar(20) not null, - primary key(dnID)); Query OK, 0 rows affected (0.02 sec) then let's insert some fake data... let's fill some djs first: mysql insert into djnames(dnName) values(dj a); Query OK, 1 row affected (0.01 sec) mysql insert into djnames(dnName) values(dj b); Query OK, 1 row affected (0.00 sec) mysql insert into djnames(dnName) values(dj c); Query OK, 1 row affected (0.00 sec) mysql insert into djnames(dnName) values(dj d); Query OK, 1 row affected (0.00 sec) mysql insert into djnames(dnName) values(dj e); Query OK, 1 row affected (0.01 sec) then let's say event #1 has dj a, djb playing with dj c and dj d and e playing alone. mysql insert into eventartists(eaEvtID,eaDnID) values(1,1); Query OK, 1 row affected (0.00 sec) mysql insert into eventartists(eaEvtID,eaDnID) values(1,4); Query OK, 1 row affected (0.00 sec) mysql insert into eventartists(eaEvtID,eaDnID) values(1,5); Query OK, 1 row affected (0.00 sec) mysql insert into eventartists(eaEvtID,eaDnID,eaDn2ID) values(1,2,3); Query OK, 1 row affected (0.00 sec) mysql select eaDnID,eaDn2ID from eventartists; ++-+ | eaDnID | eaDn2ID | ++-+ | 1 |NULL | | 2 | 3 | | 4 |NULL | | 5 |NULL | ++-+ 4 rows in set (0.00 sec) So this way it's easy to see that dj b and dj c are playing together... but when putting the names in it I can't find how.. mysql select dnName from djnames,eventartists where eaDnID = dnID or eaDn2ID=dn ID; ++ | dnName | ++ | dj a | | dj d | | dj e | | dj b | | dj c | ++ 5 rows in set (0.02 sec) this way i can't see when there are two djs together.. Any idea how to do so.. or how I can modify my tables so that it does so? I can see if some artists are playing together with something like: mysql select dnName from djnames,eventartists where (eaDnID = dnID or eaDn2ID=d nID) and eaDn2ID is not null; ++ | dnName | ++ | dj b | | dj c | ++ 2 rows in set (0.00 sec) I'm off to bed, pleaseee help me on this one, I can't finish my event calendar without dealing with those.. Regards, Etienne - 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
How to set CD as autorun
Hi, I have developed an application in PHP/MySQL in Linux environment. I need to burn it in a CD and give it to the client. I need to do one thing - that is when the client insert that CD automatically my setup should run. How to do that...? what sort of coding i need to do ..? is it that i need to code in linux..? thanks... __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ - 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: repost - compilile problems on solaris 2.6
At Sun, 06 Jan 2002 14:55:53 +0200, [EMAIL PROTECTED] wrote... : : Hi! : : fil == fil krohnengold [EMAIL PROTECTED] writes: : : fil [gcc version 2.95.2; mysql 3.23.47] : cut : : fil ctype.lo dbug.lo -lz -lcrypt -lgen -lsocket -lnsl -lm : fil rm -fr .libs/libmysqlclient.la .libs/libmysqlclient.* : fil .libs/libmysqlclient.* : fil : : fil ... then I'm stuck there for hours. Files called sh${PID} are : fil being created and removed in /tmp with this as their contents: : : fil : fil int main() { return 0; } : fil : : This is an indication that something is not completely right with your : system; You should try to spend some time to find out what is wrong, : as this could have serious effects on other programs than MySQL. Unfortunately, I don't have anything else to go on. And I can't call Sun complaining that two opensource applications aren't behaving as advertised. Maybe someone else who's had no problems compiling this package on solaris 2.6 can offer up a binary? : Are you using an NFS disk? : If yes, try to do the compilation on a normal disk. Nope. : Can you from 'ps' see what command are executing ? : : Are you using gnu make; If you are using Solaris make, then you can : get into strange problems like this. Gnu make 3.79 -- fil krohnengold network systems administrator american museum of natural history [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
Re: Mysql, innodb, linux problems
Hi Heikki, There is 4.xx version available. why upgrade to 3.xx version? -- Prabhu On Fri, 4 Jan 2002, Heikki Tuuri wrote: Date: Fri, 4 Jan 2002 16:55:29 +0200 From: Heikki Tuuri [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Mysql, innodb, linux problems Bernard, please upgrade to 3.23.47. There were several hang bugs in 3.23.39. Regards, Heikki Tuuri Innobase Oy --- Order technical MySQL/InnoDB support at https://order.mysql.com/ See http://www.innodb.com for the online manual and latest news on InnoDB Hello, Hope it is a good place for the following question I use Mysql (3.23.39) and InnoDB tables on Linux (2.2.17-14smp) and I got deadlock (In suppose it is a deadlock) when I do intensive work. intensive work = one insert + one update + 2 selects (simultaneously, with 4 differents processes, on the same table) I got deadlock = My processes went down (after the timeout I had set) and if I try an interactive request on the table (like select count(*) from ... I never got the answer. - 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 --- Beauty is bought by judgement of the eye. -- Shakespeare --- Prabhu SR. Sankhya Technologies Private Limited, Chennai-34. --- - 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: Number of mysqld
Hi, mysqld is single-process/multi-thread. What you see are 4 threads, ps on Linux doen not differenciate between threads and processes. For more details on these threads, you can look at the manual: http://www.mysql.com/doc/M/y/MySQL_threads.html when i ps on freebsd 4.4 i saw only one thread. is it normal ? another question : i run mysql on dual processor pentium II 550 Mhz with 1 GB memory. When i type top on prompt, i saw this : 105 processes: 2 running, 103 sleeping CPU states: 30.2% user, 0.0% nice, 25.9% system, 0.0% interrupt, 44.0% idle Mem: 94M Active, 123M Inact, 82M Wired, 13M Cache, 112M Buf, 693M Free Swap: 2052M Total, 2052M Free PID USERNAME PRI NICE SIZERES STATE C TIME WCPUCPU COMMAND 63408 mysql 61 0 37028K 35420K CPU1 1 17.5H 97.41% 97.41% mysqld there is 44 % persen of CPU idle, although mysql using 97 %. Can i force mysql to use that 44 % CPU idle ? how to set mysqld for optimal performance for my hardware specification above ? Thanks. regards, Antok - 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
Installing Static MySQLGUI on Solaris 7
Hi, Wondering if anyone might be able to help me with a slight problem. I downloaded the static version of the mysqlgui and I can't seem to get it working. I gunzip and try to execute and it complains that it can't find a library of some sort. I looked at the readme file in the source distribution and it says that I need to unpack it. Do I need a GNU version of unpack or should I be doing something? Please advise. Thanks. Regards, Eda __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ - 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
Select with dbi perl??? Help please!
HI! Thanks for your Help! I´ve tried this, but when inserting the % now all my selections seem to be valid or successful, even if there is no match! What is wrong? My table for testing has the following entries: Pin: 123456789123 msisdn:+491231234567knd:test PIN: 123456789012 msisdn:0knd:test So when i insert into my form the search for test, f.e. i get both entries as a result, but even when i insert the search for 123456789123 i get both results as before but when you look at my table, you see, that only one entry should be displayed! So any other ideas? Regards Sascha Kettner -Ursprüngliche Nachricht- Von: Jesse Shy [mailto:[EMAIL PROTECTED]] Gesendet: Sonntag, 6. Januar 2002 23:54 An: [EMAIL PROTECTED] Betreff: RE: Select with dbi perl??? Help please! I have found that unless I put a % sign either before, after or both, to denote the match part in question, that I don't get anything. Try this: LIKE '$input{pin}%' that should do it. If not, copy the SQL statement from your script to the mysql client to test. I wouldn't retypr it, I would copy it so you try exactly what is in your script. Good luck! -Original Message- From: Sascha Kettner [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 06, 2002 4:14 PM To: [EMAIL PROTECTED] Subject: Select with dbi perl??? Help please! Hi! I have the following script to be executed via post from a web-form; the var. Pin, msisd and knd are given by the form but however, the script is not working. I always get no results as if there are no matches, but this isnt right! This is regardless which entries i submit with the form! Any ideas to fix the problem? Thanks a lot in advance Regards Sascha Kettner #!/usr/bin/perl use DBI(); # # Get form Data # # parse_form; # Script Variables # $input{knd} = ; $input{pin} = ; $input{msisdn} = ; # What to do on submit # dojob; ## # Lets have a look at the db # ## sub dojob { # Now retrieve data from the table. my $dbh = DBI-connect(DBI:mysql:database=prepaid;host=localhost, root, sascha28, {'RaiseError' = 1}); my $sth = $dbh-prepare(SELECT * FROM pins WHERE pin LIKE '$input{pin}' OR msisdn LIKE '$input{msisdn}' OR knd LIKE '$input{knd}'); print EOF; Content-type: text/html html !--# Include Virtual=/blank.html-- head titleMAKEPINS/title meta http-equiv=refresh content=10;url=https:/index.html /head body h1 align=centerSuche Ausgeführt/h1hrbrbr /body /html EOF $sth-execute(); while (my $ref = $sth-fetchrow_hashref()) { print Eintrag gefunden: pin = $ref-{'pin'}, msisdn = $ref-{'msisdn'}\n, knd = $ref-{'knd'}\n\n; } $sth-finish(); # Disconnect from the database. $dbh-disconnect(); exit; } ## # Get form data function # ## sub parse_form { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); if (length($buffer) 5) { $buffer = $ENV{QUERY_STRING}; } @pairs = split(//, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack(C, hex($1))/eg; $input{$name} = $value; } } ### # The end # ### - 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 mysql-unsubscribe-##L=##[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 mysql-unsubscribe-##L=##[EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Select with dbi perl??? Help please!
I would suggest turning logging on ('log' entry in my.cnf under mysqld) do a search and look to see what the actual SELECT parsed by the mysqld server was. My hunch is that it is only seeing '%' and not '123456789123%' as expected. OK, so I now look at your code. It will be looking for '$input{pin}%' and NOT veriable substituted since it has SINGLE quotes (perl treats things in single quotes as literals). A better way is: my $sql = qq{ SELECT * FROM pins WHERE pin LIKE ? OR msisdn LIKE ? OR knd LIKE ? }; my $sql=$dbh-prepare($sql); $sql-execute( %.$input{pin}.%, %.$input{msisdn}.%, %.$input{knd}.%); If you want exect matches, use: $sql-execute( $input{pin}, $input{msisdn}, $input{knd}); This makes quoting problems go away. (Imagine if a single or double quote was in one of the $input variables - what would the SELECT look like... OK, so you could get round the problem with $input{pin}=$dbh-quote($input{pin}) but much easier to bind variables as above. Using '?' makes your code much easier to read. [Note, the '%' in a LIKE expression matches any zero or more characters.] Regards M -Original Message- From: Sascha Kettner [mailto:[EMAIL PROTECTED]] Sent: 07 January 2002 07:38 To: [EMAIL PROTECTED] Subject: Select with dbi perl??? Help please! HI! Thanks for your Help! I´ve tried this, but when inserting the % now all my selections seem to be valid or successful, even if there is no match! What is wrong? My table for testing has the following entries: Pin: 123456789123 msisdn:+491231234567knd:test PIN: 123456789012 msisdn:0knd:test So when i insert into my form the search for test, f.e. i get both entries as a result, but even when i insert the search for 123456789123 i get both results as before but when you look at my table, you see, that only one entry should be displayed! So any other ideas? Regards Sascha Kettner -Ursprüngliche Nachricht- Von: Jesse Shy [mailto:[EMAIL PROTECTED]] Gesendet: Sonntag, 6. Januar 2002 23:54 An: [EMAIL PROTECTED] Betreff: RE: Select with dbi perl??? Help please! I have found that unless I put a % sign either before, after or both, to denote the match part in question, that I don't get anything. Try this: LIKE '$input{pin}%' that should do it. If not, copy the SQL statement from your script to the mysql client to test. I wouldn't retypr it, I would copy it so you try exactly what is in your script. Good luck! -Original Message- From: Sascha Kettner [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 06, 2002 4:14 PM To: [EMAIL PROTECTED] Subject: Select with dbi perl??? Help please! Hi! I have the following script to be executed via post from a web-form; the var. Pin, msisd and knd are given by the form but however, the script is not working. I always get no results as if there are no matches, but this isnt right! This is regardless which entries i submit with the form! Any ideas to fix the problem? Thanks a lot in advance Regards Sascha Kettner #!/usr/bin/perl use DBI(); # # Get form Data # # parse_form; # Script Variables # $input{knd} = ; $input{pin} = ; $input{msisdn} = ; # What to do on submit # dojob; ## # Lets have a look at the db # ## sub dojob { # Now retrieve data from the table. my $dbh = DBI-connect(DBI:mysql:database=prepaid;host=localhost, root, sascha28, {'RaiseError' = 1}); my $sth = $dbh-prepare(SELECT * FROM pins WHERE pin LIKE '$input{pin}' OR msisdn LIKE '$input{msisdn}' OR knd LIKE '$input{knd}'); print EOF; Content-type: text/html html !--# Include Virtual=/blank.html-- head titleMAKEPINS/title meta http-equiv=refresh content=10;url=https:/index.html /head body h1 align=centerSuche Ausgeführt/h1hrbrbr /body /html EOF $sth-execute(); while (my $ref = $sth-fetchrow_hashref()) { print Eintrag gefunden: pin = $ref-{'pin'}, msisdn = $ref-{'msisdn'}\n, knd = $ref-{'knd'}\n\n; } $sth-finish(); # Disconnect from the database. $dbh-disconnect(); exit; } ## # Get form data function # ## sub parse_form { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); if (length($buffer) 5) { $buffer = $ENV{QUERY_STRING}; } @pairs = split(//, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack(C, hex($1))/eg; $input{$name} = $value; } } ### # The end # ### - Before posting, please check: http://www.mysql.com/manual.php (the manual)