gemini tables in mysql
Hi, since Nusphere release the source code for gemini yesterday I believe it was, I was wondering if Mysql AB was going to incorporate it into a future release if it's database. I realise in light of recent .org events Pete -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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
blob question
Hi, I'm new to blobs. I want to create a seperate table that will hold blob's or pictures. Each picture will be a .gif and will not exceed 100k in size. each image will be called, ord.gif, bar.gif, cmi,gif, lax.gif, jfk.gif, ord.gif, etc. The questions I had were 1. what would the create table statment look like. 2. Should I use a longblob based on my 100k .gif size? 3. Is one column with the gifs enough. Or should I add a autoincremented primary key? 4. Is it better to have a seperate table for this or, is it better to update my existing table, and add a blob column. Does it matter in terms of speed of queries? Queries will be done via php. Thanks! Pete -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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: blob question
Thanks, regarding the PHP info. What I need to know is: 1. what would the create table statment look like in Mysql. 2. Should I use a longblob based on my 100k .gif size? 3. Is one column with the gifs enough. Or should I add a autoincremented primary key? 4. Is it better to have a seperate table for this or, is it better to update my existing table, and add a blob column. Does it matter in terms of speed of queries? Pete Werner Stuerenburg wrote: Generally, it is not advised to add pictures to tables. See http://www.bitbybit.dk/mysqlfaq/faq.html#storing_images We had this question here some days ago, so it may ge a good idea to discuss at length possible problems why people won't like this approach of storing pics as files. WARNING: this is _not_ MySQL specific. You may want to stop reading here. 2nd WARNING: I will also show what can be done with all that information to arrive at some kind of content management wizardry. After all, people do use MySQL to do something with it, and many seem to manage pictures. So here it goes. If you let people upload images with php (which is built in and really easy) you will receive the images in, say some sort of tmp dir. You will have to move them in your code to a separate storage dir, as php will automatically delete the tmp files (see manual). Now php is part of httpd and that runs as nobody, so it cannot write to that storage dir unless you open that dir to nobody. This will be ok as you use this dir only for the purpose of storing those third party images. You may protect it in addition with .htaccess or move it out of the normal dir tree if you are a little paranoid. Now you can store the images as files with no problem and only note the filename and type or such (for example comments of the user to the picture) in the database. When you upload, you move the file, so this is a good point to record the file in your table. Once you are at it, you can retrieve the dimensions of that image with php function getImageSize and store them in your table together with the type as well. So now you know everything about this file you need for inclusion in your html code. Hence you write yourself a function, say getImgCode, which produces the html tags from this info, so you can insert the whole stuff into your code without any further thought like ... ?php getImgCode(firstNameOfMyPicture) ? ... You may even go a step further if you are in at content production. Let's assume the user uploads any text and pictures. The user is instructed to embed their pics with special syntax like ... stuff stuff stuff *MyImageFirstName* stuff stuff stuff ... You later insert the image with $content = preg_replace(/\*(\w+)\*/e, getImgCode($1), $content); This example is taken from http://php.net/manual/en/ref.pcre.php (I developed a content management system along these lines on my own, but this is just stunning - an incentive to learn the art of regular expressions). Sie schrieben am Donnerstag, 19. Juli 2001, 19:42:08: Hi, I'm new to blobs. I want to create a seperate table that will hold blob's or pictures. Each picture will be a .gif and will not exceed 100k in size. each image will be called, ord.gif, bar.gif, cmi,gif, lax.gif, jfk.gif, ord.gif, etc. The questions I had were 1. what would the create table statment look like. 2. Should I use a longblob based on my 100k .gif size? 3. Is one column with the gifs enough. Or should I add a autoincremented primary key? 4. Is it better to have a seperate table for this or, is it better to update my existing table, and add a blob column. Does it matter in terms of speed of queries? Queries will be done via php. Thanks! Pete -- Herzlich Werner Stuerenburg _ ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409 http://pferdezeitung.de -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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: innodb on nt4
Ok, got the following line working in my.ini, it created a 10mb ibdata file: innodb_data_home_dir=c:/mysql innodb_data_file_path=ibdata1 set-variable=innodb_mirrored_log_groups=1 but, when I add innodb_log_group_home_dir=c:/iblogs mysyl won't start. I created a iblogs directory. Any ideas? Pete Heikki Tuuri wrote: Pete, no, below you have a path: innodb_data_home_dir = D:\Webapp\mysql\innodb\ibdata ibdata is a directory name, not a file name. InnoDB will add the extra backslash after it. But InnoDB does not create directories. You must manually create the directories you use. Regards, Heikki http://www.innodb.com Copied message: . Hi, have a question about the inno_data_home_dir line on mysql-max3.23 do I create a file called ibdata cause it's not in any directory by default by default. innodb_data_home_dir = D:\Webapp\mysql\innodb\ibdata Pete Crercio Osmaildo da Silva wrote: Hi, For windows systems, you can install mysql-max-3.23.39, that has support for both BDB and InnoDB. For InnoDB you need to change my.cnf and include these lines: # For Innodb Databases # change D:\WebApp\mysql\innodb and the other parameters to fit your # needs innodb_data_home_dir = D:\Webapp\mysql\innodb\ibdata innodb_data_file_path = ibdata1:20M;ibdata2:20M set-variable = innodb_mirrored_log_groups=1 innodb_log_group_home_dir = D:\webapp\mysql\innodb\iblogs set-variable = innodb_log_files_in_group=3 set-variable = innodb_log_file_size=30M set-variable = innodb_log_buffer_size=8M innodb_flush_log_at_trx_commit=1 innodb_log_arch_dir = D:\webapp\mysql\innodb\iblogs innodb_log_archive=0 set-variable = innodb_buffer_pool_size=80M set-variable = innodb_additional_mem_pool_size=10M set-variable = innodb_file_io_threads=4 set-variable = innodb_lock_wait_timeout=50 Then you use mysql\bin\mysqld-max-nt --install to install it as a service. You can run SHOW VARIABLES to see the which table types are available. That's it. If you need more help, just email-me. I'd be glad to help you out. []'s Crercio O. Silva -Original Message- From: Pete Kuczynski [mailto:[EMAIL PROTECTED]] Sent: terça-feira, 17 de julho de 2001 11:20 To: [EMAIL PROTECTED] Subject: innodb on nt4 Ok, tried to update existing table(s) to InnoDB [from MYISAM] using alter table da_table type=InnoDB;, but show variables still shows table_type as MYISAM. I have the newest mysql ddb from mysql.com, but it installs with MYISAM only, not InnoDB options. I cannot find any documentation on instaling mysql on NT with InnoDB compiled in. Is there such a thing? Where? Bottom line, how do I get InnoDB compiled in with a standard mysql database installation. All I want out of this is transaction support. Best Rgards! Pete ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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-- ___Pete KuczynskiSr. Field Engineer DHL Airways Inc.Infrastructure Technology Services(773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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] - 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 -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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: innodb on nt4
I did, see below from my prev email, that part works fine: innodb_data_home_dir=c:/mysql innodb_data_file_path=ibdata1 like I said, the system created a 10mb file called ibdata1 in c:\mysql But to recap, when I try to add the specifications for logs, it wort start, that's the next line: innodb_log_group_home_dir = c:\iblogs Pete Heikki Tuuri wrote: Hi! You have to specify also the data file size in innodb_data_file_path. The following example is from the manual at www.innodb.com: Suppose you have a Windows NT machine with 128 MB RAM and a single 10 GB hard disk. Below is an example of possible configuration parameters in `my.cnf' for InnoDB: [mysqld] # You can write your other MySQL server options here # ... # innodb_data_home_dir = c:\ibdata innodb_data_file_path = ibdata1:2000M;ibdata2:2000M set-variable = innodb_mirrored_log_groups=1 innodb_log_group_home_dir = c:\iblogs set-variable = innodb_log_files_in_group=3 set-variable = innodb_log_file_size=30M set-variable = innodb_log_buffer_size=8M innodb_flush_log_at_trx_commit=1 innodb_log_arch_dir = c:\iblogs innodb_log_archive=0 set-variable = innodb_buffer_pool_size=80M set-variable = innodb_additional_mem_pool_size=10M set-variable = innodb_file_io_threads=4 set-variable = innodb_lock_wait_timeout=50 I think it is easiest that you copy and paste the above to your my.cnf and adjust directories, file sizes, and pool sizes to your needs. Files must be 4 GB currently. Hope it now succeeds! Heikki -Original Message- From: Pete Kuczynski [EMAIL PROTECTED] To: Heikki Tuuri [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Wednesday, July 18, 2001 10:14 PM Subject: Re: innodb on nt4 Ok, got the following line working in my.ini, it created a 10mb ibdata file: innodb_data_home_dir=c:/mysql innodb_data_file_path=ibdata1 set-variable=innodb_mirrored_log_groups=1 but, when I add innodb_log_group_home_dir=c:/iblogs mysyl won't start. I created a iblogs directory. Any ideas? Pete Heikki Tuuri wrote: Pete, no, below you have a path: innodb_data_home_dir = D:\Webapp\mysql\innodb\ibdata ibdata is a directory name, not a file name. InnoDB will add the extra backslash after it. But InnoDB does not create directories. You must manually create the directories you use. Regards, Heikki http://www.innodb.com Copied message: . Hi, have a question about the inno_data_home_dir line on mysql-max3.23 do I create a file called ibdata cause it's not in any directory by default by default. innodb_data_home_dir = D:\Webapp\mysql\innodb\ibdata Pete Crercio Osmaildo da Silva wrote: Hi, For windows systems, you can install mysql-max-3.23.39, that has support for both BDB and InnoDB. For InnoDB you need to change my.cnf and include these lines: # For Innodb Databases # change D:\WebApp\mysql\innodb and the other parameters to fit your # needs innodb_data_home_dir = D:\Webapp\mysql\innodb\ibdata innodb_data_file_path = ibdata1:20M;ibdata2:20M set-variable = innodb_mirrored_log_groups=1 innodb_log_group_home_dir = D:\webapp\mysql\innodb\iblogs set-variable = innodb_log_files_in_group=3 set-variable = innodb_log_file_size=30M set-variable = innodb_log_buffer_size=8M innodb_flush_log_at_trx_commit=1 innodb_log_arch_dir = D:\webapp\mysql\innodb\iblogs innodb_log_archive=0 set-variable = innodb_buffer_pool_size=80M set-variable = innodb_additional_mem_pool_size=10M set-variable = innodb_file_io_threads=4 set-variable = innodb_lock_wait_timeout=50 Then you use mysql\bin\mysqld-max-nt --install to install it as a service. You can run SHOW VARIABLES to see the which table types are available. That's it. If you need more help, just email-me. I'd be glad to help you out. []'s Crercio O. Silva -Original Message- From: Pete Kuczynski [mailto:[EMAIL PROTECTED]] Sent: terça-feira, 17 de julho de 2001 11:20 To: [EMAIL PROTECTED] Subject: innodb on nt4 Ok, tried to update existing table(s) to InnoDB [from MYISAM] using alter table da_table type=InnoDB;, but show variables still shows table_type as MYISAM. I have the newest mysql ddb from mysql.com, but it installs with MYISAM only, not InnoDB options. I cannot find any documentation on instaling mysql on NT with InnoDB compiled in. Is there such a thing? Where? Bottom line, how do I get InnoDB compiled in with a standard mysql database installation. All I want out of this is transaction support. Best Rgards! Pete ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - Before posting, please check: http://www.mysql.com/manual.php
innodb on nt4
Ok, tried to update existing table(s) to InnoDB [from MYISAM] using alter table da_table type=InnoDB;, but show variables still shows table_type as MYISAM. I have the newest mysql ddb from mysql.com, but it installs with MYISAM only, not InnoDB options. I cannot find any documentation on instaling mysql on NT with InnoDB compiled in. Is there such a thing? Where? Bottom line, how do I get InnoDB compiled in with a standard mysql database installation. All I want out of this is transaction support. Best Rgards! Pete ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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: transactions
Thanks Monty! will this work on NT as well? or do I need to move to Linux. I don't much care if the tables are BDB or InnoDB, just that I have transaction support. Good luch with the Nusphere thing! Pete Michael Widenius wrote: hi! Pete == Pete Kuczynski [EMAIL PROTECTED] writes: Pete Hi, Pete I updated my tables to BDB, but it still shows MYISAM. Pete Do I need to remove mysql and reinstall it compiled for BDB like the Pete manual suggests? I'm using nusphere's mysql on NT4 server, so I'm not Pete shure that's even possible. Pete http://www.mysql.com/doc/B/D/BDB_install.html Pete Pete I don't think NuSphere MySQL version supports BDB tables. If you want to try these out, you should download MySQL-Max from http://www.mysql.com/downloads/mysql-max-3.23.html With NuSphere's distribution, you should be able to use GEMINI tables instead of BDB tables. Have you tried this? Regards, Monty - 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 -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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: innodb on nt4
Hi, have a question about the inno_data_home_dir line on mysql-max3.23 do I create a file called ibdata cause it's not in any directory by default by default. innodb_data_home_dir = D:\Webapp\mysql\innodb\ibdata Pete Crercio Osmaildo da Silva wrote: Hi, For windows systems, you can install mysql-max-3.23.39, that has support for both BDB and InnoDB. For InnoDB you need to change my.cnf and include these lines: # For Innodb Databases # change D:\WebApp\mysql\innodb and the other parameters to fit your # needs innodb_data_home_dir = D:\Webapp\mysql\innodb\ibdata innodb_data_file_path = ibdata1:20M;ibdata2:20M set-variable = innodb_mirrored_log_groups=1 innodb_log_group_home_dir = D:\webapp\mysql\innodb\iblogs set-variable = innodb_log_files_in_group=3 set-variable = innodb_log_file_size=30M set-variable = innodb_log_buffer_size=8M innodb_flush_log_at_trx_commit=1 innodb_log_arch_dir = D:\webapp\mysql\innodb\iblogs innodb_log_archive=0 set-variable = innodb_buffer_pool_size=80M set-variable = innodb_additional_mem_pool_size=10M set-variable = innodb_file_io_threads=4 set-variable = innodb_lock_wait_timeout=50 Then you use mysql\bin\mysqld-max-nt --install to install it as a service. You can run SHOW VARIABLES to see the which table types are available. That's it. If you need more help, just email-me. I'd be glad to help you out. []'s Crercio O. Silva -Original Message- From: Pete Kuczynski [mailto:[EMAIL PROTECTED]] Sent: terça-feira, 17 de julho de 2001 11:20 To: [EMAIL PROTECTED] Subject: innodb on nt4 Ok, tried to update existing table(s) to InnoDB [from MYISAM] using alter table da_table type=InnoDB;, but show variables still shows table_type as MYISAM. I have the newest mysql ddb from mysql.com, but it installs with MYISAM only, not InnoDB options. I cannot find any documentation on instaling mysql on NT with InnoDB compiled in. Is there such a thing? Where? Bottom line, how do I get InnoDB compiled in with a standard mysql database installation. All I want out of this is transaction support. Best Rgards! Pete ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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 -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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: innodb on nt4
Aha! that's what I need to know, thanks a bunch. Pete Heikki Tuuri wrote: Pete, no, below you have a path: innodb_data_home_dir = D:\Webapp\mysql\innodb\ibdata ibdata is a directory name, not a file name. InnoDB will add the extra backslash after it. But InnoDB does not create directories. You must manually create the directories you use. Regards, Heikki http://www.innodb.com Copied message: . Hi, have a question about the inno_data_home_dir line on mysql-max3.23 do I create a file called ibdata cause it's not in any directory by default by default. innodb_data_home_dir = D:\Webapp\mysql\innodb\ibdata Pete Crercio Osmaildo da Silva wrote: Hi, For windows systems, you can install mysql-max-3.23.39, that has support for both BDB and InnoDB. For InnoDB you need to change my.cnf and include these lines: # For Innodb Databases # change D:\WebApp\mysql\innodb and the other parameters to fit your # needs innodb_data_home_dir = D:\Webapp\mysql\innodb\ibdata innodb_data_file_path = ibdata1:20M;ibdata2:20M set-variable = innodb_mirrored_log_groups=1 innodb_log_group_home_dir = D:\webapp\mysql\innodb\iblogs set-variable = innodb_log_files_in_group=3 set-variable = innodb_log_file_size=30M set-variable = innodb_log_buffer_size=8M innodb_flush_log_at_trx_commit=1 innodb_log_arch_dir = D:\webapp\mysql\innodb\iblogs innodb_log_archive=0 set-variable = innodb_buffer_pool_size=80M set-variable = innodb_additional_mem_pool_size=10M set-variable = innodb_file_io_threads=4 set-variable = innodb_lock_wait_timeout=50 Then you use mysql\bin\mysqld-max-nt --install to install it as a service. You can run SHOW VARIABLES to see the which table types are available. That's it. If you need more help, just email-me. I'd be glad to help you out. []'s Crercio O. Silva -Original Message- From: Pete Kuczynski [mailto:[EMAIL PROTECTED]] Sent: terça-feira, 17 de julho de 2001 11:20 To: [EMAIL PROTECTED] Subject: innodb on nt4 Ok, tried to update existing table(s) to InnoDB [from MYISAM] using alter table da_table type=InnoDB;, but show variables still shows table_type as MYISAM. I have the newest mysql ddb from mysql.com, but it installs with MYISAM only, not InnoDB options. I cannot find any documentation on instaling mysql on NT with InnoDB compiled in. Is there such a thing? Where? Bottom line, how do I get InnoDB compiled in with a standard mysql database installation. All I want out of this is transaction support. Best Rgards! Pete ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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-- ___Pete KuczynskiSr. Field Engineer DHL Airways Inc.Infrastructure Technology Services(773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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] -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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
transactions
Can anyone tell me for shure if my version of mysql supports transactions. Version: 3.23.37 The bitbybit web site states that is does not, but someone told me that it does, help! MySQL doesn't support transactions. If you don't know what transactions are, chances are you'll never need them. Transactions are most widely used in systems where complex updates of many tables concurrently is important and you must be absolutely sure that all things either go right or don't happen at all. That's why banking systems are heavily dependent on transactions. The rest of us, however, can usually live without 'em. -- Hi Pete To emable logging use the --log option eg --log-update when stating the server... Simon ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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: transactions
I'm fairly new to this, so pardon this ignorant question. My tabletype shows as MYISAM, mysql version 3.23.37, will transactions still work? Pete Don Read wrote: On 16-Jul-01 Simon Green wrote: MySQL Will not do transactions till V4... But there are ways to get around this.. If you use BDB or Innobase table types, then transactions _are_ supported. Since ~ 3.23.26 IIR; no idea if the code is considered stable ... http://www.mysql.com/doc/C/O/COMMIT.html http://www.mysql.com/doc/S/E/SET_TRANSACTION.html Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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: transactions
Hi, I updated my tables to BDB, but it still shows MYISAM. Do I need to remove mysql and reinstall it compiled for BDB like the manual suggests? I'm using nusphere's mysql on NT4 server, so I'm not shure that's even possible. http://www.mysql.com/doc/B/D/BDB_install.html Pete To compile MySQL with Berkeley DB support, download MySQL Version 3.23.34 or newer and configure MySQL with the --with-berkeley-db option. See section 4.7 Installing a MySQL Source Distribution. cd /path/to/source/of/mysql-3.23.34 ./configure --with-berkeley-db Don Read wrote: On 16-Jul-01 Pete Kuczynski wrote: I'm fairly new to this, so pardon this ignorant question. My tabletype shows as MYISAM, mysql version 3.23.37, will transactions still work? No. alter table da_table type=BDB; Check the manual http://www.mysql.com/doc/A/L/ALTER_TABLE.html Pete Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. - 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 -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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
table types
Hi, I understand mysql supported InnoDB and BDB table types for the purposes of transaction logging, which I need to use. Which is recommended by you folks for NT4 boxes. Pete ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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: backup/restore of mysql winNT
Ok, figured hout hot do generate the update logs, and to rotate the logs, but, cant seem to upload the logs. From mysql/bin: The statment: mysql -u root -pmypassword --one-database mydatabasename update.1 generates the error that it cannot find the update file. How do I tell mysql where the update log is. Currently it's in d:\mysql\bin Pete Original Message Subject: RE: backup/restore of mysql Date: Tue, 10 Jul 2001 17:48:31 +0100 From: Simon Green [EMAIL PROTECTED] To: 'Pete Kuczynski' [EMAIL PROTECTED] Hi Pete To emable loffing use the --log option eg --log-update when stating the server... Simon -Original Message- From: Pete Kuczynski [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 17:51 To: Simon Green Subject: Re: backup/restore of mysql Hi, do I need to generate these logs using the my.ini file on NT. Pete Simon Green wrote: You can use update/bin_update logs. Run these logs from the time of the last backup and it should take you DB up to date till the time in went down Simon PS update logs have all the SQL statements in them so it should be very simple to recover! -Original Message- From: Pete Kuczynski [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 16:00 To: [EMAIL PROTECTED] Subject: backup/restore of mysql Hi, I've posted this question before, and some were kind enough to respond with suggestions to my question [replication], but I'm looking for something more difinitave. Background: I'm running a production mysql database/php4/Apache on a NT4 IBM Netfinity server [3500 records, growing by 100 a day or so]. I do not have the option to go to lunux/unix [company's call not mine]. I am backing up the database twice a day, noon and 6 pm. Question: if a disk should crash, I can recover the database from the last tape backup, but not the transactions that took place in between. Is replacation of the database on another box my only option? Dosn't mysql support transaction logging like MSSQL or Oricle, or Postgres?. I don't wan't to switch to another database, but as this one grows, it's becoming incrisingly important to be able to do a complete database recovery in the event of a crash. Kindest thanks! Pete -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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
backup/restore of mysql
Hi, I've posted this question before, and some were kind enough to respond with suggestions to my question [replication], but I'm looking for something more difinitave. Background: I'm running a production mysql database/php4/Apache on a NT4 IBM Netfinity server [3500 records, growing by 100 a day or so]. I do not have the option to go to lunux/unix [company's call not mine]. I am backing up the database twice a day, noon and 6 pm. Question: if a disk should crash, I can recover the database from the last tape backup, but not the transactions that took place in between. Is replacation of the database on another box my only option? Dosn't mysql support transaction logging like MSSQL or Oricle, or Postgres?. I don't wan't to switch to another database, but as this one grows, it's becoming incrisingly important to be able to do a complete database recovery in the event of a crash. Kindest thanks! Pete -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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: backup/restore of mysql
Very cool. Thaks very much Simon! Pete Simon Green wrote: Hi Pete To emable loffing use the --log option eg --log-update when stating the server... Simon -Original Message- From: Pete Kuczynski [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 17:51 To: Simon Green Subject: Re: backup/restore of mysql Hi, do I need to generate these logs using the my.ini file on NT. Pete Simon Green wrote: You can use update/bin_update logs. Run these logs from the time of the last backup and it should take you DB up to date till the time in went down Simon PS update logs have all the SQL statements in them so it should be very simple to recover! -Original Message- From: Pete Kuczynski [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 16:00 To: [EMAIL PROTECTED] Subject: backup/restore of mysql Hi, I've posted this question before, and some were kind enough to respond with suggestions to my question [replication], but I'm looking for something more difinitave. Background: I'm running a production mysql database/php4/Apache on a NT4 IBM Netfinity server [3500 records, growing by 100 a day or so]. I do not have the option to go to lunux/unix [company's call not mine]. I am backing up the database twice a day, noon and 6 pm. Question: if a disk should crash, I can recover the database from the last tape backup, but not the transactions that took place in between. Is replacation of the database on another box my only option? Dosn't mysql support transaction logging like MSSQL or Oricle, or Postgres?. I don't wan't to switch to another database, but as this one grows, it's becoming incrisingly important to be able to do a complete database recovery in the event of a crash. Kindest thanks! Pete -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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
backup on nt4
Hi, being new to mysql on nt4, how do those of you running Mysql on NT4 server, backup and restore you databases. I understand that transactions are not supported on nt, if so, is a tape backup all that I have to fall back on in the event of a crash? What about all the records that will be lost between the time of the backup and the crash? Thanks for any help! Pete -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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
restorin a nt 4 database
Hi, cen anyone help me with this question. To restoring a database [in the event of a disk crash for example], run the restore from tape and rebuild the database, then take the transaction logs and upload those into the database to bring it up to date. From what I can tell, Mysql does NOT support transaction logging, at least not for NT. Can anyone help, if transactions are not supported, how are those folks that have mysql running on NT, restoring a database? I'm using Mysql version 3.23.27. Thanks! ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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: Reporting Tool : Linux?
The ez way, use Mysqlfrom to access you database, run a query to extract the data you wisk, save it as html, looks very nice. http://www.anse.de/mysqlfront/download.php Regards, Pete Mazur wrote: :-) Ya, I was thinking I would try to stay away from formatting in HTML, and let the tool do it, quite like Crystal would (at least, I think it does...have only read books on it in Barnes Noble). But I could resort to using JSP's to build the reports. H, I will check Freshmeat too, though. I just figured I can't be the first guy on the block that wants to design reports out of MySQL without using Windows. I mean, I recall MySQL boasting that NASA uses MySQL...what the heck do they use for reporting? Of course, I suppose if you have MySQL on an NT machine, you can add Crystal Reports. Any additional dialog from anyone else (you too J.K. :-0 ) would be appreciated! Rob Mazur - Original Message - From: Joshua J. Kugler [EMAIL PROTECTED] To: Mazur [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, July 02, 2001 4:31 PM Subject: Re: Reporting Tool : Linux? Print to HTML. Pull up in browser. Print. But seriously, have you tried looking on freshmeat? j- k- On Monday 02 July 2001 14:32, Mazur wrote: OK, what are all you guys using for a reporting tool, with MySQL as a backend (where you don't need Windows)? I need a reporting tool to generate management reports/letters out of MySQL, which I will be using for a web-based application. I guess I am looking for something like Crystal Reports, but ported for Linux. I am suspecting I may be asking for too much at the moment. As far as I can see, I can not run Crystal on a Linux web server. So, what are you guys using to generate reports for the exec's such that you do not need a Windows machine in any part of the equation? Rob Mazur p.s. At the moment, I am thinking of using an MS Access link to MySQL to generate reports and mail merges, etc., but I hate to do that if I can help it.. - 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 -- Joshua Kugler, Information Services Director Associated Students of the University of Alaska Fairbanks [EMAIL PROTECTED], 907-474-7601 - 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 -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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 HELP -- Unable to start Win2k service
Only time I had this error on a NT4 server was when I attempted to get logging to work and I made a mistake editing the mycnf and myini files. When I cycled the mysql service, it would no come back up. Removing the offending edit allowed it to start. Pete Michael Tam wrote: Hi all, I have beening running mysql on my win2k for awhile. This afternoon, I have restarted my pc and the next thing I notice mysql service was unable to start. The following is the message I got: Could not start the Mysql service on Local Computer. Error 1067: The process terminated unexpectedly. I have tried to remove the service, uninstalled the mysql and reinstalled it. I got the same result. Any help would be appreciated. Regards, Michael -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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
transaction logs using nt4
Hi, I'm still trying to get an answer to this. When restoring a database [in the event of a disk crash for example], I would run my restore from tape and rebuild the database, then I would take the transaction logs and upload those into the database to bring it up to date. From what I cen tell, Mysql does NOT support transaction logging, at least not for NT. Can anyone help, if transactions are not supported, how are those folks that have mysql running on NT, restoring a database? I'm using Mysql version 3.23.27. Thanks! Pete ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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
restoring a database on nt4
Hoping someone can point me in the right direction. I have Nusphere Mysql database in production [using mysql/PHP/apache, no perl]. The database has 1 table, 20 columns, with 3500 entries and growing. I am backing up the database to tape 2 times a day. At noon and at 5pm, both are full backups. Let's say the disk should crask at 4pm, one hour prior to the next full backup. Now I restore the database from the noon backup, how do I restore 4 hours worth of transactions, so the database is up to date? Again, the Mysql database is on a NT4.0 server. Thanks in advance for any insight! Pete ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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 query for duplicate records
That makes sense, sound like I'm redoing in PHP what the UNIQUE column already does. So all I need to do is modify my PHP trap using mysql_affected_rows() = 0, retun a error messagu to the used indicating a rcord already exists. Will try it, THX! Pete Paul DuBois wrote: At 5:46 PM -0500 6/27/01, Pete Kuczynski wrote: Thanks Paul! ps works great! I modified the database with a UNIQUE column like you recommended earlier, this will now help in the PHP script to trap the duplicate entry and advise the user of the dup. But if hostname now has a UNIQUE index on it, it won't even be possible for your table to have duplicate hostname values, other than NULL. Probably all you need to do is just go ahead and try to insert the record, and if mysql_affected_rows() is 0, it was a duplicate and was rejected. ? // check for duplicate row $query = SELECT hostname, COUNT(*) AS count FROM asset GROUP BY hostname HAVING count 1 $result = mysql_query($query); // check if row is returned, if yes error, if no insert if (mysql_num_rows($result) != 0) { echo error; } else { // DO INSERT } ? Pete -- Paul DuBois, [EMAIL PROTECTED] -- ___ Pete Kuczynski Principal Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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
logs on nt4
Hi, Where would I find the logs files from Mysql on a NT4 server? I have Nusphere Mysql installed with Apache/PHP and Mysql I monotor the Apache Error and Access logs, but should'nt there be logs generated by Mysql? I don't want to run out of disc space cause I neglected to clear them out. Thanks for any insight in advance! Pete -- ___ Pete Kuczynski Principal Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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
multiple database issue on winNT4.0
Hi, Can I connect to multiple databases on a 4.0 NT box? I created a test database on the same box that has the pre-production ddb, and I can not connect to it using the same PHP scripts [I redirected the scripts to look to the new test ddb] and all I had is my PHP trap statment Unable to connect ... I suspect I cannot, but some insight into this would help. Thanks! Pete -- ___ Pete Kuczynski Principal Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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 query for duplicate records
Hi, How would a word a select statment, to search a database for duplicate entries in one field. For example, the fields: device, hostname, IP, comments I want to find all instances where there my be two devices with the same hostname. Thanks! Pete -- ___ Pete Kuczynski Principal Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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 query for duplicate records
Thanks Paul! ps works great! I modified the database with a UNIQUE column like you recommended earlier, this will now help in the PHP script to trap the duplicate entry and advise the user of the dup. ? // check for duplicate row $query = SELECT hostname, COUNT(*) AS count FROM asset GROUP BY hostname HAVING count 1 $result = mysql_query($query); // check if row is returned, if yes error, if no insert if (mysql_num_rows($result) != 0) { echo error; } else { // DO INSERT } ? Pete Paul DuBois wrote: At 3:13 PM -0500 6/27/01, Pete Kuczynski wrote: Hi, How would a word a select statment, to search a database for duplicate entries in one field. For example, the fields: device, hostname, IP, comments I want to find all instances where there my be two devices with the same hostname. SELECT hostname, COUNT(*) AS count FROM tbl_name GROUP BY hostname HAVING count 1 Thanks! Pete -- ___ Pete Kuczynski Principal Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 -- Paul DuBois, [EMAIL PROTECTED] -- ___ Pete Kuczynski Principal Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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
preventing duplicate entries
I want to prevent duplicate entries into my mysql database which holds invertory of all network eqpt at my site. Engineers access it thru netscape and the query insert is done via pdp [below]. I will place the script into php, any pointers on this would be appreciated. THX! Pete html body ?php require(fedb.inc); mysql_connect(localhost,$user,$password); @mysql_select_db($db) or die( Unable to select database); /*Insert into database */ mysql_query (INSERT INTO asset (site_id, hostname, device, model, serial, ip, dept, mhz, ram, hd_size, os_ver, status, data_port, pp_port, hub_port, digi_port, csmim_port, tprmim_port, xyplex_port, comments, fe) VALUES ('$site_id', '$hostname', '$device', '$model', '$serial', '$ip', '$dept', '$mhz', '$ram', '$hd_size', '$os_ver', '$status', '$data_port', '$pp_port', '$hub_port', '$digi_port', '$csmim_port', '$tprmim_port', '$xyplex_port', '$comments', '$fe') ); print (Thanks for submitting your device.); ? a href='index.html'bHome/b/a /body /html ___ Pete Kuczynski Principal Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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: preventing duplicate entries
My primary key field is a auto incremented index, the field I want to make unique, or to say, prevent duplicates in, is the hostname field, which has, hostnames of devices. Is the key word UNIQUE then? Not all of the devices have hostnames assigned to them, like terminals, so the hostname field is blank in many cases. If I make that field UNIQUE, will that cause a problem, with multiple blank fields? Thx! Pete Kristopher Briscoe wrote: What does your table definition look like? What fields are you looking to make unique? All you need to do is set one or multiple combined fields to UNIQUE or Primary keys. This will prevent duplicats. Another way would be to query the table for the information that is going to be inserted and see if you get a row returned. If so, then let the FE know. I would combine both methods for optimal assurance. On another note, I have been very interested in working with DHL. At one point I was speaking with someone in your HR department, but they have seen departed. I know this is odd, but if I forwared you my resume do you think you could pass it on to your internal recruiting staff? I am a Sr. SUN Solaris Engineer with more than 10years experience if that helps at all. Good luck with your work. Kris- _ Get your FREE download of MSN Explorer at http://explorer.msn.com -- ___ Pete Kuczynski Principal Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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 with perl
I overcame this by adding to my php script, something that goves the user the results, summerised, of what they added to the database, thus when hitting refresh, it just refreshes the results of what the php script returned, not what they submitted. My php script is below. Pete html body ?php require(fedb.inc); mysql_connect(localhost,$user,$password); @mysql_select_db($db) or die( Unable to select database); /*Insert into database */ mysql_query (INSERT INTO asset (site_id, hostname, device, model, serial, ip, dept, mhz, ram, hd_size, os_ver, status, data_port, pp_port, hub_port, digi_port, csmim_port, tprmim_port, xyplex_port, comments, fe) VALUES ('$site_id', '$hostname', '$device', '$model', '$serial', '$ip', '$dept', '$mhz', '$ram', '$hd_size', '$os_ver', '$status', '$data_port', '$pp_port', '$hub_port', '$digi_port', '$csmim_port', '$tprmim_port', '$xyplex_port', '$comments', '$fe') ); print ($site_id); print ( ); print ($hostname); print ( ); print ($device); print ( ); print ($model); print ( ); print ($serial); print ( ); print ($ip); print ( ); print ($dept); print ( ); print ($mhz); print ( ); print ($ram); print ( ); print ($hd_size); print ( ); print ($os_ver); print ( ); print ($status); print ( ); print ($data_port); print ( ); print ($pp_port); print ( ); print ($hub_port); print ( ); print ($digi_port); print ( ); print ($csmim_port); print ( ); print ($tprmim_port); print ( ); print ($xyplex_port); print ( ); print ($comments); print ( ); print ($fe); print ( ); print (p); print (p); print (Thanks for submitting your device.); ? a href='index.html'bHome/b/a | a href='searchform.html'bSearch Item/b/a | a href='searchform_all.html'bSearch Site/b/a | a href='updateform.html'bUpdate/b/a | a href='deleteform.html'bDelete/b/a /body /html Cindy wrote: Dawn H writes: I've written a couple of scripts and have a thing that I haven't quite figured out. If anyone can shed light on this, I'd appreciate it. When a person submits a form that inserts a record into the database, if they then refresh the page that comes up after the submit, the record will be submitted a second time. I suppose this is due to the fact that the subroutine that is called with the submit contains both the write to database bit and the view bit. So refreshing causes a repeat of both items. How can I do this without that problem? I was finally forced to add a check that there wasn't already an identical record (using a minimum comparison set of fields) before inserting the record. There really isn't any way to prevent dingbats from refreshing, so... I CYA by emailing a copy of the record/element values to myself when I refuse to add it in, but I havne't had any spurious refusals so far. --Cindy - 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 -- ___ Pete Kuczynski Principal Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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