Insert from select
I think that I saw a similar query last week some time but I cannot remember the sql syntax. Is it possible to insert from a select. Something like insert into table_a from select * from table_b where blah=somevalue Thanks, David McInnis - 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: Insert from select
- Original Message - From: David McInnis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, March 16, 2002 3:26 PM Subject: Insert from select I think that I saw a similar query last week some time but I cannot remember the sql syntax. Is it possible to insert from a select. Something like insert into table_a from select * from table_b where blah=somevalue Thanks, David McInnis query like; insert into table_a select * from table_b where blah=somevalue Kittiphum Worachat,MT. www.hatyailab.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: Insert from select
On Saturday, 16. March 2002 09:26, David McInnis wrote: I think that I saw a similar query last week some time but I cannot remember the sql syntax. Is it possible to insert from a select. See http://www.mysql.com/doc/I/N/INSERT_SELECT.html Regards Georg - 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 do I get a binary distribution of mysql to run?
Mark, Friday, March 15, 2002, 5:45:40 PM, you wrote: MDescription: M Downloaded recently installed via RPM. Ran mysql_install_db M Executed safe_mysqld, but fails. Below is an excerpt from log file. M 020315 09:25:31 mysqld started M 020315 9:25:31 /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13) M 020315 09:25:31 mysqld ended $ perror 13 Error code 13: Permission denied Please, check your permissions on MySQL data dir. MHow-To-Repeat: MFix: MSubmitter-Id: [EMAIL PROTECTED] MOriginator:Mark Graybill MOrganization: M University of Minnesota student MMySQL support: none MSynopsis: safe_mysqld fails MSeverity: non-critical MPriority: high MCategory: mysql MClass: support MRelease: mysql-3.23.36 (Source distribution) MEnvironment: M Pentium II, Linux Redhat 7.1, mysql, mysql-server-3.23.36-1.i386.rpm M System: Linux linuxbox 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686 unknown M Architecture: i686 M Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc M GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs M gcc version 2.96 2731 (Red Hat Linux 7.1 2.96-81) M Compilation info: CC='gcc' CFLAGS='-O2 -march=i386 -mcpu=i686' CXX='c++' CXXFLAGS='-O2 -march=i386 -mcpu=i686' LDFLAGS='' M LIBC: M lrwxrwxrwx1 root root 13 Jan 8 01:32 /lib/libc.so.6 - libc-2.2.2.so M -rwxr-xr-x2 root root 1236396 Apr 6 2001 /lib/libc-2.2.2.so M -rw-r--r--1 root root 26350254 Apr 6 2001 /usr/lib/libc.a M -rw-r--r--1 root root 178 Apr 6 2001 /usr/lib/libc.so M Configure command: ./configure i386-redhat-linux --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include M --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --without-debug --without-readline --enable-shared M --with-extra-charsets=complex --with-bench --localstatedir=/var/lib/mysql --with-unix-socket-path=/var/lib/mysql/mysql.sock --with-mysqld-user=mysql --with-extra-charsets=all --with-berkeley-db -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ 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
Remote access to MySQL
Thomas, Friday, March 15, 2002, 11:03:25 PM, you wrote: TS I want to access various databases on a MySQL server remotely. I've set up TS an entry in the mysql.user table to allow access to mysql for all hosts TS in subnet 10.2.107.0/255.255.255.0. First this worked fine. Then my server TS moved from address 10.2.107.24 to 10.2.107.204. Now I do not have access TS anymore to any of the databases except on the server itself accessing via TS localhost. TS Any idea how to bring this back to work to allow access to whole subnet TS 10.2.107.0/255.255.255.0 would be appreciated! Thomas, show me the output of following statement: SHOW GRANTS FOR 'your_user'@'your_host'; TS Thomas -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ 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
RE: password special character muck up (I think)
adam, Friday, March 15, 2002, 9:47:03 PM, you wrote: an I don't see how to submit 'blahblah;;' using the quotes. an I've tried an mysql -u root an and then typed all the conceivable combinations for password an and an mysql -u root --password=blahblah;; an and an mysql -u root --password='blahblah;;' an What's worse is that I've looked at the raw table file and confirmed an that the password is blahblah;; If you can see your password in the table directly it means you didn't use function password() to encrypt your password. Run mysqld with '--skip-grant-tables' option and reset your root password using GRANT statement. Don't forget execute FLUSH PRIVILEGES _before_ using GRANT. an I could change it manually, but I don't want to corrupt the table (I an assume that's a real possibility). -- tried that on a dev machine, it an doesn't work because I can't flush the privileges. -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ 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
RE: SQL QUERY help joining three tables
* John Hughes I have three tables: students has student_id and student_name parents has parent_id and parent_name parentlog has student_id and parent_id I want to search the parentlog WHERE student_id = some_id GROUP BY parent_id (This will bring back two rows when there are two parents) At the same time I want to get the name of the student that matches student_id and the name of the parent. I can LEFT JOIN students with parentlog USING(student_id) but I can't figure how I can join the parents so that I can get the name of match for the parent_id. Can I join three tables and search all in one pass? Yes, and LEFT JOIN may not be needed: SELECT students.*,parents.* FROM parentlog,students,parents WHERE students.student_id = parentlog.student_id AND parents.parent_id = parentlog.parent_id Using LEFT JOIN: SELECT students.*,parents.* FROM parentlog LEFT JOIN students USING(student_id) LEFT JOIN parents ON parents.parent_id = parentlog.parent_id USING can not be used in the second join because it relates to the previous table, which in this case is students, and that table has no parent_id. By using ON you can join with any table in your table list. More details can be found in the manual: URL: http://www.mysql.com/doc/J/O/JOIN.html -- Roger 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
mysql
Hello! I have table ++-+--+-+++ | Field | Type| Null | Key | Default| Extra | ++-+--+-+++ | id | int(11) | | PRI | NULL | auto_increment | | date | date| | | -00-00 || | story | text| | ||| ++-+--+-+++ When I making SELECT to column I everything is ok, but when I'm trying to include some other column, response is ERROR 2013: Lost connection to MySQL server during query Other tables in this database works ok. Perhaps table files are corrupt? How can I repair it? The error log contains following Number of processes running now: 0 020316 06:38:20 mysqld restarted /usr/sbin/mysqld: ready for connections mysqld got signal 11; The manual section 'Debugging a MySQL server' tells you how to use a stack trace and/or the core file to produce a readable backtrace that may help in finding out why mysqld died Attemping backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong stack range sanity check, ok, backtrace follows 0x4008189d 0x812a699 0x80f77b1 0x80d69e6 0x80d5f3c 0x80d5ce6 0x80ce781 0x80b4bed 0x80b7d98 0x80b3ecf 0x80b3457 stack trace successful --Uldis - 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++ patch for GCC 3
Try a GNU 3 patch from MySQL++ page. If that one fails, let me know. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ 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
Re: cannot create Tables with MysqlGUI 1.7.5
Stefaan Contreras writes: Heya, I am quite new to all this intriguing stuff. I use mysql-3.23.47-win with MySqlGUI 1.7.5 I see my mysql database, but cannot create tables in it. Any ideas? Kind regards, Stefaan Hi! MySQLGUI does not have that feature. You may use CREATE TABLE statement though... -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ 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
Re: Bad pthreads detection on Tru64 5.1a
Dan Nelson writes: Description: Tru64 5.1a is more strict than other versions of Tru64 when compiling a threaded program. extract of pthreads.h file on Tru64 5.1: /* * Enable reentrant errno.h. HOWEVER: this is here only to avoid breaking old * (and incorrect) code that assumes it's here. This will only work if * pthread.h is the first header file included, and it is always far better * to avoid such assumptions. You should always define _REENTRANT on the * command line, usually by using cc -pthread or cxx -pthread, to be sure * that it will be available for all header files. */ #ifdef _PTHREAD_ENV_UNIX # ifndef _REENTRANT # define _REENTRANT1 # endif #endif extract of pthreads.h file on Tru64 5.1a: #ifdef _PTHREAD_ENV_UNIX # ifndef _REENTRANT # error Please compile the module including pthread.h with -pthread # endif #endif How-To-Repeat: ./configure , then notice that mit-pthreads is getting built Fix: --- configure.in~ Thu Mar 14 16:40:46 2002 +++ configure.in Thu Mar 14 16:40:46 2002 @@ -907,6 +907,8 @@ then with_named_thread=-lpthread -lmach -lexc #with_named_thread=-lpthread -lmach -lexc -lc + CFLAGS=$CFLAGS -D_REENTRANT + CXXFLAGS=$CXXFLAGS -D_REENTRANT AC_DEFINE(HAVE_DEC_THREADS) AC_MSG_RESULT(yes) else Hi! Thank you for your contribution. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ 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
Re: Help with hanging MySQL server
Ed Carp ([EMAIL PROTECTED]) writes: Hi! I'm having a problem with mysql hanging. I'm running mysql-3.23.36 on a Linux 2.2.17 kernel. It ran just fine last week, but when we rebooted the box, mysql will start, but connections to the database just hang. mysqldmin, etc. all hang also. /tmp/mysqld.sock is being created, but when we do a telnet localhost 3306, it connects, but we don't get the characteristic 3.23.36garbage string that we would normally see. Any hints? An update: I upgraded to RedHat Linux 7.2 (the server was running 6.2), only to find the system unusable - common programs would core dump, leading me to believe the shared libraries had gotten trashed. So, I pulled a 20GB drive off the shelf, formatted it, loaded RedHat 7.2 on it, restored the databases, and everything works fine. I still don't know what the problem was. I hope it doesn't come back :( -- Ed Carp, N7EKG - [EMAIL PROTECTED] - 214/341-4420 - http://www.pobox.com/~erc I tell you, freedom and human rights in America are doomed. The U.S. government will lead the American people in and the West in general into an unbearable hell and a choking life. --Osama bin Laden Look around - he's right... :( - 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
maximum columns in a table
What maximum columns can a table has in MySQL?? Thanks!! - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL - check for existing data
I have a db table that receives weather data several times a day via a php script and cron job. Sometimes the data is duplicated for a certain time window. 11:50 44 degree 11:50 44 degree 11:40 45 degree 11:30 46 degree 11:20 46 degree 11:10 45 degree I do not want the duplicate data for the 11:50 time slot to be inserted into my table. Is there a common method used to check if data already exists in a db table and if so to cancel the data insertion? What is this called? Is this demonstrated in the MySQL book or documentation. If I knew what this was called, I might have better luck finding solution. Thanks Craig [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
production site running mysql 4.0
Just in case you were wondering what the state of mysql version 4 is. We're running a production site with a reasonably loaded MySQL 4.0 back-end. You can visit the site at http://www.workzoo.com/ The main motivation for mysql4 was the enhanced fulltext index support which is awesome and rapidly evolving. Good job Monty and the rest of the gang. (and thanks for all the support via the lists). ~mark. - 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 - check for existing data
Hi, Just set a unique index on the right column and you won't have anymore duplicate in your table :) ALTER TABLE yourtable ADD UNIQUE(your_column); Regards, Jocelyn Fournier Presence-PC - Original Message - From: Craig Westerman [EMAIL PROTECTED] To: MySQL List [EMAIL PROTECTED] Sent: Saturday, March 16, 2002 3:38 PM Subject: MySQL - check for existing data I have a db table that receives weather data several times a day via a php script and cron job. Sometimes the data is duplicated for a certain time window. 11:50 44 degree 11:50 44 degree 11:40 45 degree 11:30 46 degree 11:20 46 degree 11:10 45 degree I do not want the duplicate data for the 11:50 time slot to be inserted into my table. Is there a common method used to check if data already exists in a db table and if so to cancel the data insertion? What is this called? Is this demonstrated in the MySQL book or documentation. If I knew what this was called, I might have better luck finding solution. Thanks Craig [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 - 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
mysql.user to be used as application login password table
Hi All, I am newbie in PHP/MySQL. I am going to write an application of PHP/MySQL. I need one password table to do user authentication job. My application user will be given accounts for using MySQL with appropriate privileges. And, I found table mysql.user which is similar to my proposed password table. Is it ok to use this table to control the access right of a PHP program instead of creating another one for that. Thanks for any suggestion. Alex Lui - 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
Finding out whos using the database
Is there a command that I can use to find out how many people, or more specifically, who, is using the database? I tried the mysql web site but the search result are more irrelevant than relevant. Thanks, Chip W www.wiegand.org [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.user to be used as application login password table
From: Alex Lui [EMAIL PROTECTED] I am newbie in PHP/MySQL. I am going to write an application of PHP/MySQL. I need one password table to do user authentication job. My application user will be given accounts for using MySQL with appropriate privileges. And, I found table mysql.user which is similar to my proposed password table. Is it ok to use this table to control the access right of a PHP program instead of creating another one for that. The mysql.user table is for controlling the actual MySQL user rights to the daemon. You don't want to use this for your application, especially as you'd now have a web-based user with rights to the reserved mysql database. That's a huge security risk. I'd highly recommend creating a new table, outside of the reserved mysql database, and leave that database for root users only. -- denonymous www.coldcircuit.net - 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 install it properly
= I have just downloaded the mysql++-1.7.1-win32-borland.zip Please explain me how to install/configure it on borland c++ 5 (path and stuff like this)... I tried to do something but the easiest example doesn't seem to work. THANXS - 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: Fetching an optional array from an optional column
From: phplist [EMAIL PROTECTED] I've tried further, and still came up short. This time, if I use the % - it returns nothing. Here's another way to do it, using PHP: ?php if (!subject) { header(Location: nowhere.html); exit; } // Connects to database include(cnx_db.inc); // First addslashes to text: $formatted_subject = addslashes($subject); // Formats Query // New way to format $sql below: $sql = SELECT * FROM links WHERE (SUBJECT1='$formatted_subject' OR SUBJECT2='$formatted_subject') ; // check to see if $geographic has been selected. the value for the // default option should be empty in the originating HTML form if ($geographic) $sql .= AND GEOGRAPHIC='$geographic' ; $sql .= ORDER BY ORGANIZATION ASC; // End new $sql formatting print($sql); $sql_result = mysql_query($sql); if (!$sql_result) { echo Can't execute $sql . mysql_error(); exit; } // organizes data in an orderly manner (ie bulleted area) while ($row = mysql_fetch_array($sql_result)) { $esc_organization = $row[ORGANIZATION]; $esc_desc = $row[DESCRIPTION]; $esc_url = $row[URL]; $esc_subject1 = $row[SUBJECT1]; $esc_subject2 = $row[SUBJECT2]; $esc_geographic = $row[GEOGRAPHIC]; $organization = stripslashes($esc_organization); $description = stripslashes($esc_desc); $url = stripslashes($esc_url); $subject1 = stripslashes($esc_subject1); $subject2 = stripslashes($esc_subject2); $geographic = stripslashes($esc_geographic); $option_block .= libOrganization:/b a href=\http://$url\;$organization/abrbGeographic Region:/b $geographicbrbDescription:/b $descriptionbrbURL:/b a href=\http://$url\;$url/a/librbSubject1:/b $subject1brbSubject2:/b $subject2\n; } include(byebye.inc); ? !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head titleTest Result/title /head body h1?php echo $subject; ?/h1 You have chosen ?php echo $subject; ?. Here are the results: Ul ?php echo $option_block; ? /UL /body /html - 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: Remote access to MySQL
Hi! An: [EMAIL PROTECTED] Kopie: Thema: Remote access to MySQL Thomas, show me the output of following statement: SHOW GRANTS FOR 'your_user'@'your_host'; +--+ | Grants for @10.2.107.0/255.255.255.0 | +--+ | GRANT ALL PRIVILEGES ON *.* TO ''@'10.2.107.0/255.255.255.0' | +--+ 1 row in set (0.00 sec) -- Thomas - 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
Database not founded
Hello, I have since several weeks a problem in mysql. I'm using the 3.23.42 version on MacOSX. Sometime, the mysql does'nt respond any more to request made by my script (often PHP), and I have the following error : Table 'mysql.db' doesn't exist. The MySQL process is up, but it seems to don't have database any more. Does anybody had this kind of problem ? Do you see a solution ? (I don't have any error in the mysql.log nor in the system log) Thanks a lot. Emmanuel - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: how to install it properly
brikou writes: = I have just downloaded the mysql++-1.7.1-win32-borland.zip Please explain me how to install/configure it on borland c++ 5 (path and stuff like this)... I tried to do something but the easiest example doesn't seem to work. THANXS Just follow instructions in README in borland subdir. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ 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
RE: Finding out whos using the database
SHOW PROCESSLIST -Original Message- From: Chip Wiegand [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 16, 2002 1:30 AM To: [EMAIL PROTECTED] Subject: Finding out whos using the database Is there a command that I can use to find out how many people, or more specifically, who, is using the database? I tried the mysql web site but the search result are more irrelevant than relevant. Thanks, Chip W www.wiegand.org [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 - 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
Skip locks
I apologize if this question has been asked in the past. I am looking to implement a queueing layer similar to Oracle AQ for mysql. It uses a feature called skip locks that allows you to run a statement like: select * from table for update skip locked I have been unable to locate this type of feature in Mysql. I know it exists in SQL Server as READPAST. Has anyone discussed this in the past? I am interested in implementing it if people would think it is useful. It is a great feature for parallelizing applications and for enterprise queueing. If nobody has discussed this, I will start reading the source to see how to implement. Thanks for your input! Mike Mangino - 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
division
In relational algebra, queries using the expression for all are usually handled with the division operation. What is the equivalent of the division operation in mysql (in sql, it's where not exists B except A)? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Database not founded
At 11:13 AM 3/16/2002, you wrote: Hello, I have since several weeks a problem in mysql. I'm using the 3.23.42 version on MacOSX. Sometime, the mysql does'nt respond any more to request made by my script (often PHP), and I have the following error : Table 'mysql.db' doesn't exist. The MySQL process is up, but it seems to don't have database any more. Does anybody had this kind of problem ? Do you see a solution ? (I don't have any error in the mysql.log nor in the system log) Thanks a lot. Emmanuel Emmanuel, Maybe your session has timed out and closed your database connection? Brent _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.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: request: mysql install question
Hi, I just got this similar problem in mysql install. I fixed this by ignoring the follow line in /etc/my.cnf : socket=/tmp/mysql.socket Hope this help you. Hung Lam - Original Message - From: Subbiah Nishant [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 14, 2002 10:47 PM Subject: request: mysql install question After I went through the following steps successfully, (The previous problem I had regarding inability to untar files was solved by downloading stuff on that computer where it was untarred. Before that I was trying to untar stuff downloaded on to a samba share !!!) shell groupadd mysql shell useradd -g mysql mysql shell gunzip mysql-VERSION.tar.gz | tar -xvf - shell cd mysql-VERSION shell ./configure --prefix=/usr/local/mysql shell make shell make install shell scripts/mysql_install_db shell chown -R root /usr/local/mysql shell chown -R mysql /usr/local/mysql/var shell chgrp -R mysql /usr/local/mysql shell cp support-files/my-medium.cnf /etc/my.cnf for shell /usr/local/mysql/bin/safe_mysqld --user=mysql I get, [1] 15387 [root@calamity /root]# Starting mysqld daemon with databases from /usr/local/mysql/var 020314 09:47:12 mysqld ended [1]+ Done/usr/local/mysql/bin/safe_mysqld then when I try to, ./mysqladmin -u root password 'passwd' I get, ./mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)' Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists! Please advise. I have many more things to do including setting up php and apache. Would also appreciate links to those as well. Also how can I specify RPMs to install to a particular directory like /usr/local/mysql. There was an option, rpm --dbpath path. So could I do a, rpm -Uvh --dbpath /usr/local/mysql rpm then ?? Thanks. _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.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 mysql-unsubscribe-##L=##[EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mysql++ patch for GCC 3
I tried the patch and it still failed. Sorry for long post, but hope it may help. Thank you. Vlad. The details: $ uname -vr 2.4.7-10custom #12 SMP Mon Mar 11 00:54:16 CST 2002 $ gcc -v Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.4/specs Configured with: ../gcc-3.0.4/configure --enable-threads Thread model: posix gcc version 3.0.4 $ make make all-recursive make[1]: Entering directory `/home/vlad/tmp/mysql++/mysql++-1.7.9' Making all in sqlplusint make[2]: Entering directory `/home/vlad/tmp/mysql++/mysql++-1.7.9/sqlplusint' /bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I../sqlplusint -I/usr/include/mysql -g -O2 -c coldata.cc rm -f .libs/coldata.lo c++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I../sqlplusint -I/usr/include/mysql -g -O2 -Wp,-MD,.deps/coldata.pp -c -fPIC -DPIC coldata.cc -o .libs/coldata.lo In file included from const_string2.hh:2, from const_string3.hh:2, from coldata.cc:2: const_string1.hh: In member function `const char const_string::at(unsigned int) const': const_string1.hh:50: `out_of_range' undeclared (first use this function) const_string1.hh:50: (Each undeclared identifier is reported only once for eachfunction it appears in.) ... type_info1.hh:105: confused by earlier errors, bailing out make[2]: *** [coldata.lo] Error 1 make[2]: Leaving directory `/home/vlad/tmp/mysql++/mysql++-1.7.9/sqlplusint' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/vlad/tmp/mysql++/mysql++-1.7.9' make: *** [all-recursive-am] Error 2 $ - 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 - check for existing data
On Saturday 16 March 2002 03:14 pm, you said: Hi, Just set a unique index on the right column and you won't have anymore duplicate in your table :) ALTER TABLE yourtable ADD UNIQUE(your_column); Regards, You might also want to use REPLACE INTO ... rather than INSERT INTO... as the latter would give you a duplicate key error. The syntax for REPLACE is identical to INSERT, apart for the first word, of course... You can use UPDATE too... sql, query -- Geoff Quelch Email: [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
system error 1067 - can't start mysqld
Hi mailing list, I can't start mysqld-nt as I get the eror message 1067. If I start winmysqladmin.exe there is no server visible. The manual tell me in part 2.4 Post-installation Setup and Testing that I should start the script ./scripts/mysql_install_db but this script is not availabale (at all) at my Windows distribution. Any ideas what's wrong? Thank you, A:lex - 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
Problem with case-insensitive queries
Description: REGEXP and LIKE operators in SELECT statements will NOT do case-insensitive queries in VARCHAR() and BLOB text columns. E.g. SELECT * FROM article_database WHERE article_preview LIKE '%a%'; '%a%' LIKE 'What is a CPU?' - 0 or SELECT * FROM article_database WHERE article_preview REGEXP 'the'; 'the' REGEXP 'The main purpose of today's...' - 0 How-To-Repeat: Up there Fix: N/A Submitter-Id: none Originator:Nadeem Douba Organization: none MySQL support: none Synopsis: Problem with case-insensitive queries Severity: critical Priority: high Category: mysql Class: sw-bug Release: mysql-3.23.49 (Source distribution) Environment: System: OpenBSD bs-dee.org 3.0 GENERIC#94 i386 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-unknown-openbsd3.0/2.95.3/specs gcc version 2.95.3 20010125 (prerelease) Compilation info: CC='gcc' CFLAGS='' CXX='c++' CXXFLAGS='' LDFLAGS='' LIBC: -r--r--r-- 1 root bin 729068 Oct 18 15:25 /usr/lib/libc.a -r--r--r-- 1 root bin 594173 Oct 18 15:25 /usr/lib/libc.so.28.0 Configure command: ./configure --prefix=/home/daemons/mysql --exec-prefix=/home/daemons/mysql --libdir=/usr/lib --mandir=/usr/man --includedir=/usr/man --with-berkeley-db - 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
MySQL tables named 'column' cause problems.
Hello, While reading my cron messages I found out that the mysqldump returns with an error mysqldump: Can't get CREATE TABLE for table 'column' (You have an error in your SQL syntax near 'column' at line 1) The table column is: CREATE TABLE `column` ( `id` int(11) NOT NULL default '0', `name` text NOT NULL, `user` text NOT NULL, `text` longtext NOT NULL ) TYPE=MyISAM; Anyway, I was unable to a 'DROP column;'. This returns in an error value. Then I change the above snipped into: CREATE TABLE `kolom` ( `id` int(11) NOT NULL default '0', `name` text NOT NULL, `user` text NOT NULL, `text` longtext NOT NULL ) TYPE=MyISAM; (kolom is dutch for column), there is no problem and my backup exists without errors. So, in short it comes down too: MySQL buggs when there is a table named 'column' Please mail any replies to [EMAIL PROTECTED] as I am not a member of this list. Bye, Tozz - 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 tables named 'column' cause problems.
Column is a mysql reserved word. Just like desc or asc or tons of others. See here: http://www.mysql.com/doc/R/e/Reserved_words.html Dan -Original Message- From: Tozz [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 16, 2002 8:58 PM To: [EMAIL PROTECTED] Subject: MySQL tables named 'column' cause problems. Hello, While reading my cron messages I found out that the mysqldump returns with an error mysqldump: Can't get CREATE TABLE for table 'column' (You have an error in your SQL syntax near 'column' at line 1) The table column is: CREATE TABLE `column` ( `id` int(11) NOT NULL default '0', `name` text NOT NULL, `user` text NOT NULL, `text` longtext NOT NULL ) TYPE=MyISAM; Anyway, I was unable to a 'DROP column;'. This returns in an error value. Then I change the above snipped into: CREATE TABLE `kolom` ( `id` int(11) NOT NULL default '0', `name` text NOT NULL, `user` text NOT NULL, `text` longtext NOT NULL ) TYPE=MyISAM; (kolom is dutch for column), there is no problem and my backup exists without errors. So, in short it comes down too: MySQL buggs when there is a table named 'column' Please mail any replies to [EMAIL PROTECTED] as I am not a member of this list. Bye, Tozz - 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
Fix for building MySQL with GCC 3
Here's how I fixed the compile problem with gcc 3.0.4 and mysql (3.23.49) which resulted in the undefined symbol __cxa_pure_virtual error (tested on Solaris 2.6 and 8). The suggestion of setting CXXLD=g++ is right, but unfortunately, configure ignores it; both client/Makefile.in and sql/Makefile.in specifically set CXXLD to $(CXX). Since I'm not an autoconf-knowledgeable person, what I did was, after running configure, change the line CXXLD = $(CXX) to CXXLD = g++ in the Makefiles in both client/ and sql/. A make at this point completed fine. Note that, at least on Solaris, gcc 3 links the resulting binaries to libstdc++, so be sure to have LD_LIBRARY_PATH set to include libstdc++'s path. My guess is the correct way to fix this is to have configure properly set it, and do a CXXLD = @CXXLD@ in those Makefile.in files. Bryan - 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 tables named 'column' cause problems.
Hey Column is a mysql reserved word. Just like desc or asc or tons of others. See here: http://www.mysql.com/doc/R/e/Reserved_words.html Dan Then, imho I think its stupid that MySQL lets you create tables with reserved words, but it stops you from making dumps. Still seems like a bug to me. Bye, Tozz - 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
white background
Hi There H Well, it's not really a mysql topic, but it's a bit connected to it. I have a website that uses frames. My php script retrieves data from a mysql database and displays it. My problem now is: each time that specific page loads it first displays a white background, retrieves the data and then displays it. It's just a cosmetic issue but I'd like to avoid that ;-) Any Ideas? Many TIAs Andreas P.S. Oh, and... disallowing html mails? Huh? We're in stoneage? - 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
gweMysql JDBC Driver Update!!
Hi, All I updated JDBC Driver i maintained. :-) http://www.t3-jpn.com/jdbc/jdbcmysql.html [New Features for only JDK1.4 ] Add New Property 'useNewIO' to use SocketChannel and DirectBuffer with JDK1.4's New I/O API. Please download gweMysqlJDBC_extra4.zip and set useNewIO true [New Features for both JDK1.3 and JDK1.4 ] Support ResultSet.TYPE_SCROLL_INSENSITIVE Add New Property 'add5CAfter5C' to solve Shift JIS 0x5C(\) problem. Please set add5CAfter5C true and call PreparedStatement.setString() -- Borland Japan / Consulting Group KEN TAKAHASHI, Tomohiro E-Mail:[EMAIL PROTECTED] http://www.borland.co.jp/ Borland -- Enabling a new digital world where our customers have the freedom of choice to develop, deploy, and integrate applications across the enterprise and the Internet. http://www.borland.com Don't miss the 13th Annual Borland® Conference, May 18-22 in Anaheim, California. Hundreds of sessions are being offered to help you enable the new digital world with best-in-class solutions for Web Services, Java technologies, mobile and enterprise computing, cross-platform development, .NET and J2EE platform technologies, and more! Register today! http://www.borland.com/conf2002 - 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
Need MySQL help with tables and records
Hi, I need a little help as I am a beginner with db things. I'm building a database for technicians and help-desk problems where technical problem tickets are stored in one table, and technicians in another. Really I have two main questions. First, each problem may have more than one technician assigned. In the problems table were I have a technician column, should I build an array that holds all the primary keys for each technician assigned or should I build a third table that links multiple technicians to a single problem? And my second question is this, I select the technicians based on alphabetical order out of a list. Each time there is an occurrance of a problem,I go to the next tech in alpha order. How can I do this with MySQL? Or would I have to organize in alpha order using PHP and select my next record? I'd like to go with whatever doesn't absorb system resources too badly and it just seems like having 3 to 5 users accessing this system and having PHP alpha order the database over and over would do that for each occurrance. And how could I flag a record so that I would know where to get the next record once I have it in alpha order? Thanks, David - 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 tables named 'column' cause problems.
On Sun, Mar 17, 2002 at 05:31:52AM +0100, Tozz wrote: Hey Column is a mysql reserved word. Just like desc or asc or tons of others. See here: http://www.mysql.com/doc/R/e/Reserved_words.html Dan Then, imho I think its stupid that MySQL lets you create tables with reserved words, but it stops you from making dumps. Still seems like a bug to me. Sir, naming a column column is generally considered a bad idea, regardless of the DBMS being used. It's like naming a variable variable. Bob Hall -- All my databases are named database, datafile, datafil, etc. The tables are all named table, tabell, datasett, etc. Every one who has to do maintenance on the databases hates me. It's MySQL's fault for letting me set them up that way. - 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
Can not run multiple command scripts
As usual, I am a newbie to MySQL. I have been studying the user manual and Paul DuBois' book, MySQL. I have tried to run the scripts for menagerie and samp_db on both a Windows 2000 machine and a Linux machine, both local and remote with version 3.23.49a. I have used the command line and several GUI interfaces with the same result. I am able to run a single command, however, if I try and run a script with two or more commands, I receive an error number 1064 - syntax error. This usually shows the error at line 1. What am I doing wrong? I am about to give up. /*/ Steven Gearhart Gearhart, Inc. Phone/Fax: 770.466.2898 Email: [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: Need MySQL help with tables and records
On Sun, Mar 17, 2002 at 12:28:35AM -0500, Lionlike wrote: Hi, I need a little help as I am a beginner with db things. I'm building a database for technicians and help-desk problems where technical problem tickets are stored in one table, and technicians in another. Really I have two main questions. First, each problem may have more than one technician assigned. In the problems table were I have a technician column, should I build an array that holds all the primary keys for each technician assigned or should I build a third table that links multiple technicians to a single problem? And my second question is this, I select the technicians based on alphabetical order out of a list. Each time there is an occurrance of a problem,I go to the next tech in alpha order. How can I do this with MySQL? Or would I have to organize in alpha order using PHP and select my next record? I'd like to go with whatever doesn't absorb system resources too badly and it just seems like having 3 to 5 users accessing this system and having PHP alpha order the database over and over would do that for each occurrance. And how could I flag a record so that I would know where to get the next record once I have it in alpha order? Thanks, David Second question first: Create a little table that stores the ID for the last tech assigned a ticket. The next time a ticket is assigned, have your code retrieve the ID and search the tech table for the next ID. Your SELECT query can do any alpha ordering more efficiently than PHP. First question: Your tables are in a many-to-many relationship. Any tech is assigned one or more tickets, and any ticket is assigned to one or more techs. Use a join table to create the many-to-many relationship. The join table has only two columns: a tech ID column and a ticket ID column. Each time a new ticket is assigned, add one row to the join table for each tech assigned the ticket. Each row contains the tech ID and the ticket ID. This makes your SELECT queries a little more complicated, but in the long run it creates fewer problems than any other solution. Bob Hall - 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 tables named 'column' cause problems.
He didn't name a column 'column', he named a table 'column'. This may have seemed reasonable given his application. In any case, bad idea or not, his point is well-taken. It worked in one place but not another. While column is a reserved word, the directions at http://www.mysql.com/doc/L/e/Legal_names.html clearly state you can use it as a table name anyway, as long as you quote it properly. So, it seems to me, either Tozz did something wrong when he invoked mysqldump, or there's a bug which breaks mysqldump on tables named 'column' (or any other reserved word, I'd guess). I suppose it would be useful to know which version of mysql he is using and how he's calling mysqldump so we can figure out which is the case. Michael On Sun, 17 Mar 2002, Bob Hall wrote: On Sun, Mar 17, 2002 at 05:31:52AM +0100, Tozz wrote: Hey Column is a mysql reserved word. Just like desc or asc or tons of others. See here: http://www.mysql.com/doc/R/e/Reserved_words.html Dan Then, imho I think its stupid that MySQL lets you create tables with reserved words, but it stops you from making dumps. Still seems like a bug to me. Sir, naming a column column is generally considered a bad idea, regardless of the DBMS being used. It's like naming a variable variable. Bob Hall -- All my databases are named database, datafile, datafil, etc. The tables are all named table, tabell, datasett, etc. Every one who has to do maintenance on the databases hates me. It's MySQL's fault for letting me set them up that way. - 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: white background
On Sunday, 17. March 2002 05:52, Andreas Dau wrote: Hi There H Well, it's not really a mysql topic, but it's a bit connected to it. I have a website that uses frames. My php script retrieves data from a mysql database and displays it. My problem now is: each time that specific page loads it first displays a white background, retrieves the data and then displays it. It's just a cosmetic issue but I'd like to avoid that ;-) Hello, the page cannot display any content until the script finished. If you need some output before take a look here : http://www.php.net/flush Regards Georg - 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-3.23.49a (Official MySQL Binary) Environment: System: Linux goku 2.2.14-5.0 #1 Tue Mar 7 21:07:39 EST 2000 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/egcs-2.91.66/specs gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) Compilation info: CC='gcc' CFLAGS='-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' CXX='gcc' CXXFLAGS='-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' LDFLAGS='' LIBC: lrwxrwxrwx1 root root 13 Mar 17 2002 /lib/libc.so.6 - libc-2.1.3.so -rwxr-xr-x1 root root 4101324 Mar 1 2000 /lib/libc-2.1.3.so -rw-r--r--1 root root 20272704 Mar 1 2000 /usr/lib/libc.a -rw-r--r--1 root root 178 Mar 1 2000 /usr/lib/libc.so Configure command: ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --with-other-libc=/usr/local/mysql-glibc '--with-comment=Official MySQL Binary' --prefix=/usr/local/mysql --with-extra-charset=complex --enable-thread-safe-client --enable-local-infile 'CFLAGS=-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' 'CXXFLAGS=-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -mcpu=pentiumpro ! -O3 -fno-omit-frame-pointer' CXX=gcc Perl: This is perl, version 5.005_03 built for i386-linux - 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