Re: created user but access denied
OFF TOPIC Remove space between '-p' and the password in you command line. That isbash-2.05a$ mysql -uwcjporoot -pwc_jpo /OFF TOPIC - Original Message - From: Egor Egorov [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 6:36 AM Subject: Re: created user but access denied David T-G [EMAIL PROTECTED] wrote: I have just moved my web site from one server to another (whew!) and I am having a problem with a mysql user definition for a calendar program. I used mysqldump to dump the calendar database (wc_jpo) and loaded it on the new server; it appears to be happily there. I then ran grant all privileges on wc_jpo.* to wcjporoot identified by 'pass' with grant option ; flush privileges ; and similarly for ... wcjporoot@% ... but still cannot get in; whenever I try with the mysql client I get bash-2.05a$ mysql -uwcjporoot -p wc_jpo Enter password: ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) and, similarly, the web script cannot get in. Yet when I select the user record from mysql.user and mysql.db they appear complete. What glaringly obvious omission have I failed to see? Remove entry for user ''@'localhost from the mysql.user table: DELETE FROM user WHERE user='' AND host='localhost'; FLUSH PRIVILEGES; -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: select statement not working in a php page
What result are you getting? First off, I see that your HTML is possibly incorrect; should it be: echo tdWarranty ID:/td\n; th is a table header. Second, if you are expecting a single result row, then you do not need the while() loop. Do a single fetch and display the result. rick People will forget what you said. People will forget what you did. But people will never forget how you made them feel. - Original Message - From: Chip Wiegand [EMAIL PROTECTED] To: MySQL [EMAIL PROTECTED] Sent: Monday, March 22, 2004 11:33 AM Subject: select statement not working in a php page I am trying to get a single result from a database, which works fine at the sql command line. I have tried several versions of code, this being the most recent - ? $sql = select max(WarrantyID) from warrantycopy; $result=mysql_query($sql) or die(Could not get the id number : . mysql_error()); while($query_data = mysql_fetch_array($result)) { $WarrantyID = $query_data[WarrantyID]; echo tr\n; echo thWarranty ID:/th\n; echo td$WarrantyID/td\n; echo /tr\n; } ? No matter what I do I do not get the desired max id number from the column WarrantyID. The same query works fine at the sql command line. What am I doing wrong? thanks -- Chip -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: PHP script cannot connect MySQL server
/var/lib/mysql/mysql.sock is created when the mysql server starts. It disappears when mysql shuts down. Did you provide access to the databases as root? Is there a password associated with access? For instance, how do you statr mysql from the command line: mysql -u root -ppassword mydatabase rick People will forget what you said. People will forget what you did. But people will never forget how you made them feel. - Original Message - From: Sami Maisniemi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 22, 2004 12:25 PM Subject: PHP script cannot connect MySQL server I finally managed to install MySQL succesfully. I created a simple DB with two different tables. I also created a simple PHP script to list all DBs and tables. However, it seems that the PHP script cannot access MySQL server, because the following error message is displayed: Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /srv/www/htdocs/sqltest.php on line 4 Warning: mysql_list_dbs(): supplied argument is not a valid MySQL-Link resource in /srv/www/htdocs/sqltest.php on line 5 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /srv/www/htdocs/sqltest.php on line 6 Any idea what might be wrong? There is no file 'mysql.sock' in '/var/lib/ mysql'. The PHP script is as follows: htmlbody ?php $link_id = mysql_connect(localhost, root); $result = mysql_list_dbs($link_id); $num_rows = mysql_num_rows($result); while ($db_data = mysql_fetch_row($result)) { echo $db_data[0]. BR; $result2 = mysql_list_tables($db_data[0]); $num_rows2 = mysql_num_rows($result2); while ($table_data = mysql_fetch_row($result2)) { echo -- . $table_data[0]. BR; } echo == $num_rows2 table(s) in . $db_data[0] . BR; } ? /body/html Regards Sami -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Cannot Resolve External Symtab Entries to mysqlclient Library Within C Program
I am attempting to interface between a simple C program and MySQL client library, but without luck. I searched the MySQLforum archives to see if there was info specific to this problem. While there were other folks who had problems connecting C/C++ to MySQL, none of the issue were similar to this, that is linking to resolve external name table references. Here is the actual program: *** myprog.cc *** #include /usr/include/mysql/mysql.h int main(void) { MYSQL * myptr; mysql_init(myptr); return 0; } To compile it, I use: $ gcc -c myprog.cc To link/load: $ ld myprog.o -o myprog ld: warning: cannot find entry symbol _start; defaulting to 08048074 myprog.o: In function `main': myprog.o(.text+0xd): undefined reference to `mysql_init I tried the following (with this result): $ ld -lmysqlclient -o myprog myprog.o ld: warning: cannot find entry symbol _start; defaulting to 08048208 /usr/lib/libmysqlclient.so: undefined reference to [EMAIL PROTECTED]' Or, if I compile and link/load in one step, I get this: $ gcc -o myprog myprog.cc /tmp/ccJ8uuvK.o: In function `main': /tmp/ccJ8uuvK.o(.text+0xd): undefined reference to `mysql_init' collect2: ld returned 1 exit status And ls -l /usr/lib/libmysqlclient* reveals: rwxrwxrwx1 root root 24 Mar 13 19:34 /usr/lib/libmysqlclient.so - libmysqlclient.so.12.0.0 lrwxrwxrwx1 root root 24 Mar 13 19:34 /usr/lib/libmysqlclient.so.10 - libmysqlclient.so.10.0.0 -rwxr-xr-x1 root root 224606 Feb 13 04:25 /usr/lib/libmysqlclient.so.10.0.0 lrwxrwxrwx1 root root 24 Mar 13 19:34 /usr/lib/libmysqlclient.so.12 - libmysqlclient.so.12.0.0 -rwxr-xr-x1 root root 249972 Feb 13 04:25 /usr/lib/libmysqlclient.so.12.0.0 lrwxrwxrwx1 root root 26 Mar 13 19:34 /usr/lib/libmysqlclient_r.so - libmysqlclient_r.so.12.0.0 lrwxrwxrwx1 root root 26 Mar 13 19:34 /usr/lib/libmysqlclient_r.so.10 - libmysqlclient_r.so.10.0.0 -rwxr-xr-x1 root root 230560 Feb 13 04:25 /usr/lib/libmysqlclient_r.so.10.0.0 lrwxrwxrwx1 root root 26 Mar 13 19:34 /usr/lib/libmysqlclient_r.so.12 - libmysqlclient_r.so.12.0.0 My setup is Red Hat Linux version 7.0. I used the latest mysql RPM (for Red Hat 7.0) from the mysql web-site Where can I go for help on this? If somebody has a suggestion, I'm all ears. FYI, using MySQL with PHP works like a charm from the command line and when called from a web-page. So, I know MySQL is there, ready to do my bidding. I looked through the latestMySQL manual concerning the C/C++ API; no help. thanks rick -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Executing MySQL Commands From Within C Program
I am attempting to interface between a simple C program and MySQL, but without luck. I searched the MySQLforum archives to see if there was info specific to this problem. While there were other folks who had problems connecting C/C++ to MySQL, none of the issue were similar to this, that is linking to resolve external name table references. Here is the actual program: *** myprog.cc *** #include /usr/include/mysql/mysql.h int main(void) { MYSQL * myptr; mysql_init(myptr); return 0; } To compile it, I use: $ gcc -c myprog.cc To link/load: $ ld myprog.o -o myprog ld: warning: cannot find entry symbol _start; defaulting to 08048074 myprog.o: In function `main': myprog.o(.text+0xd): undefined reference to `mysql_init If I try inclusion of the libmysqlclient.so library in the 'ld' command, I get this: $ ld -l /usr/lib/libmysqlclient.so myprog.o -o myprog ld: cannot find -l/usr/lib/libmysqlclient.so Or, if I compile and link/load in one step, I get this: $ gcc -o myprog myprog.cc /tmp/ccJ8uuvK.o: In function `main': /tmp/ccJ8uuvK.o(.text+0xd): undefined reference to `mysql_init' collect2: ld returned 1 exit status And ls -l /usr/lib/libmysqlclient* reveals: rwxrwxrwx1 root root 24 Mar 13 19:34 /usr/lib/libmysqlclient.so - libmysqlclient.so.12.0.0 lrwxrwxrwx1 root root 24 Mar 13 19:34 /usr/lib/libmysqlclient.so.10 - libmysqlclient.so.10.0.0 -rwxr-xr-x1 root root 224606 Feb 13 04:25 /usr/lib/libmysqlclient.so.10.0.0 lrwxrwxrwx1 root root 24 Mar 13 19:34 /usr/lib/libmysqlclient.so.12 - libmysqlclient.so.12.0.0 -rwxr-xr-x1 root root 249972 Feb 13 04:25 /usr/lib/libmysqlclient.so.12.0.0 lrwxrwxrwx1 root root 26 Mar 13 19:34 /usr/lib/libmysqlclient_r.so - libmysqlclient_r.so.12.0.0 lrwxrwxrwx1 root root 26 Mar 13 19:34 /usr/lib/libmysqlclient_r.so.10 - libmysqlclient_r.so.10.0.0 -rwxr-xr-x1 root root 230560 Feb 13 04:25 /usr/lib/libmysqlclient_r.so.10.0.0 lrwxrwxrwx1 root root 26 Mar 13 19:34 /usr/lib/libmysqlclient_r.so.12 - libmysqlclient_r.so.12.0.0 My setup is Red Hat Linux version 7.0. I used the latest mysql RPM (for Red Hat 7.0) from the mysql web-site Where can I go for help on this? If somebody has a suggestion, I'm all ears. FYI, using MySQL with PHP works like a charm from the command line and when called from a web-page. So, I know MySQL is there, ready to do my bidding. I looked through the latestMySQL manual concerning the C/C++ API; no help. thanks rick -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Executing MySQL Commands From Within C Program
See my original post below prior to reading the next 4 lines.. In addition to what I tried below, I tried the following (with this result): $ ld -lmysqlclient -o myprog myprog.o ld: warning: cannot find entry symbol _start; defaulting to 08048208 /usr/lib/libmysqlclient.so: undefined reference to [EMAIL PROTECTED]' - Original Message - I am attempting to interface between a simple C program and MySQL, but without luck. I searched the MySQLforum archives to see if there was info specific to this problem. While there were other folks who had problems connecting C/C++ to MySQL, none of the issue were similar to this, that is linking to resolve external name table references. Here is the actual program: *** myprog.cc *** #include /usr/include/mysql/mysql.h int main(void) { MYSQL * myptr; mysql_init(myptr); return 0; } To compile it, I use: $ gcc -c myprog.cc To link/load: $ ld myprog.o -o myprog ld: warning: cannot find entry symbol _start; defaulting to 08048074 myprog.o: In function `main': myprog.o(.text+0xd): undefined reference to `mysql_init If I try inclusion of the libmysqlclient.so library in the 'ld' command, I get this: $ ld -l /usr/lib/libmysqlclient.so myprog.o -o myprog ld: cannot find -l/usr/lib/libmysqlclient.so Or, if I compile and link/load in one step, I get this: $ gcc -o myprog myprog.cc /tmp/ccJ8uuvK.o: In function `main': /tmp/ccJ8uuvK.o(.text+0xd): undefined reference to `mysql_init' collect2: ld returned 1 exit status And ls -l /usr/lib/libmysqlclient* reveals: rwxrwxrwx1 root root 24 Mar 13 19:34 /usr/lib/libmysqlclient.so - libmysqlclient.so.12.0.0 lrwxrwxrwx1 root root 24 Mar 13 19:34 /usr/lib/libmysqlclient.so.10 - libmysqlclient.so.10.0.0 -rwxr-xr-x1 root root 224606 Feb 13 04:25 /usr/lib/libmysqlclient.so.10.0.0 lrwxrwxrwx1 root root 24 Mar 13 19:34 /usr/lib/libmysqlclient.so.12 - libmysqlclient.so.12.0.0 -rwxr-xr-x1 root root 249972 Feb 13 04:25 /usr/lib/libmysqlclient.so.12.0.0 lrwxrwxrwx1 root root 26 Mar 13 19:34 /usr/lib/libmysqlclient_r.so - libmysqlclient_r.so.12.0.0 lrwxrwxrwx1 root root 26 Mar 13 19:34 /usr/lib/libmysqlclient_r.so.10 - libmysqlclient_r.so.10.0.0 -rwxr-xr-x1 root root 230560 Feb 13 04:25 /usr/lib/libmysqlclient_r.so.10.0.0 lrwxrwxrwx1 root root 26 Mar 13 19:34 /usr/lib/libmysqlclient_r.so.12 - libmysqlclient_r.so.12.0.0 My setup is Red Hat Linux version 7.0. I used the latest mysql RPM (for Red Hat 7.0) from the mysql web-site Where can I go for help on this? If somebody has a suggestion, I'm all ears. FYI, using MySQL with PHP works like a charm from the command line and when called from a web-page. So, I know MySQL is there, ready to do my bidding. I looked through the latestMySQL manual concerning the C/C++ API; no help. thanks rick -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: no subject
SELECT name,birthday FROM mytable -Original Message- From: Chuck PUP Payne [mailto:[EMAIL PROTECTED]] Sent: Monday, April 08, 2002 10:49 AM To: MySQL Mailing List (E-mail) Subject: no subject Ok, I know I am going to get yell about this but how can I do an SQL and only show to fields from a table. For example I only like to see the names and birthday? Or will as so all fields for a given table. Chuck Payne - 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: Help with Tables Please
FieldID INT UNSIGNED DEFAULT '0' NOT NULL, -Original Message- From: Soheil Shaghaghi [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 07, 2002 11:10 PM To: [EMAIL PROTECTED] Subject: RE: Help with Tables Please Thanks for the tip Dan, I changed it, but it still gives me the same error. Any other suggestion? -Original Message- From: Dan Nelson [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 07, 2002 7:08 PM To: Soheil Shaghaghi Cc: [EMAIL PROTECTED] Subject: Re: Help with Tables Please In the last episode (Apr 07), Soheil Shaghaghi said: Hi all, I have create the following mysql table, and when I try to add more than 128 rows in the table, I get this error: Duplicate entry '127' for key 1 I have no duplicate entries in there, and I can not figure out what's going on! CREATE TABLE CMSHOWNREQUIREDFIELDS1 ( FieldID tinyint(4) DEFAULT '0' NOT NULL, PRIMARY KEY (FieldID) ); This is a FAQ. TINYINT has a range of -127 to 127. Change it to INT. -- Dan Nelson [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 - 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 setup
First, I assume that the same value for userlevel may be used by multiple users. That is, multiple users can have userlevel equal to 1 or equal to 2 or 3 or whatever. Therefore, you CANNOT use userlevel as PRIMARY KEY. PRIMARY KEY is a UNIQUE identifier. Thus, I recommend that each user be identified by a unique user_id. user_id int unsigned not null primary key, userlevel unsigned tinyint not null, username char(8) not null, userpass char(16) not null, security_key int Next, once the user is authenticated, you can pass value of user_id through sessions, to preserve security. Include with the session values a unique, random key that is generated during authentication. Store this random key in security_key. When a user makes a download/upload request, ensure that the key stored in the database is the same as that of the session. -Original Message- From: Norman Zhang [mailto:[EMAIL PROTECTED]] Sent: Monday, April 08, 2002 12:49 PM To: [EMAIL PROTECTED] Subject: database setup Hi, I am setting up a mysql database, with two tables. One keeps the user authentication info such as user name, password and user level. The other table with contains files for upload and download. Is there a good way to setup the user authentication table so it can check appropriate user rights (user level) then provide the appropriate upload or download page? I came up with a scheme as follows, userlevel unsigned tinyint not null primary key, username char(8) not null, userpass char(16) not null I can store user passwords using MySQL's password encryption. But when I need to access the upload/download table I need to somehow notify the database that what level of access the user has. If I set userlevel=1 (or any number) after succesful authentication in the script, I would compromised the other table. As hackers can change userlevel in the php script without going through the authentication. Can someone please provide me a couple of pointers how I go about setting up my database? TIA. Regards, Norman - 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: Strange behavior
it worked for me: mysql describe t_timesheet; ++---+--+-+-++ | Field | Type | Null | Key | Default | Extra | ++---+--+-+-++ | id | int(11) | | PRI | NULL| auto_increment | | ts_h | decimal(10,0) | YES | | NULL|| | ts_pid | int(11) | YES | | NULL|| | ts_day | text | YES | | NULL|| ++---+--+-+-++ 4 rows in set (0.00 sec) mysql select * from t_timesheet; ++--+++ | id | ts_h | ts_pid | ts_day | ++--+++ | 1 |0 | 60 | 2002032800 | ++--+++ 1 row in set (0.00 sec) mysql update t_timesheet set ts_h=1 where ts_pid=60 and ts_day=2002032800; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql select * from t_timesheet; ++--+++ | id | ts_h | ts_pid | ts_day | ++--+++ | 1 |1 | 60 | 2002032800 | ++--+++ 1 row in set (0.00 sec) -Original Message- From: LeTortorec, Jean-Louis [mailto:[EMAIL PROTECTED]] Sent: Monday, April 08, 2002 4:17 PM To: '[EMAIL PROTECTED]' Subject: Strange behavior I have a table with the following fields: id=autoincrement, int (11) ts_h=decimal ts_pid=int (11) ts_day=text There is a unique record where ts_pid=60 and ts_day=2002032800 (ts_h=0). If I do [update t_timesheet set ts_h=0 where ts_pid=60 and ts_day=2002032800 ], every thing works fine. (nothing is changed because the values remain the same) But if I change the query to ts_h=1: [update t_timesheet set ts_h=1 where ts_pid=60 and ts_day=2002032800 ] The record is deleted instead of being update. I changed ts_h to a decimal, or integer, same behavior. It deletes my record instead of updating it. Any idea why this occurs? Thank you. Jean-Louis - 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: Escaped by 2 things?
Since you are writing out the file, you must select which character to ESCAPE with. How would you expect mysql to choose? -Original Message- From: Cliff [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 11:46 PM To: [EMAIL PROTECTED] Subject: Escaped by 2 things? Short and simple, is it possible to escape by two different parameters? This used to work: SELECT * from allusa WHERE (updated_by='I' or updated_by='A' or updated_by='L') AND (id9) AND last_updated '2002020100' ORDER BY last_updated INTO OUTFILE '/home/www/site/admin/admin/dbdump/bb200202010700.txt' FIELDS TERMINATED BY ' ' ENCLOSED BY '' ESCAPED BY ('' '\n'); but now it gives the error: ERROR 1064: You have an error in your SQL syntax near ' ' '' at line 1 anyone know if this is possible? - 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: Problems with UPDATE in v3.23.49 (is this a bug)
No, this is NOT a bug. According to the manual (you read it, right?), TIMESTAMP is created so that when a record is UPDATEd or INSERTed, the time of the change is entered into the record. If you want a date that does not changem use the DATE fiel -Original Message- From: Hihn Jason [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 10:33 AM To: '[EMAIL PROTECTED]' Subject: Problems with UPDATE in v3.23.49 (is this a bug) I have a table whose schema contains: id INTEGER AUTO_INCREMENT, gen_time TIMESTAMP, rec_time TIMESTAMP, repeats INTEGER DEFAULT 0, PRIMARY KEY (id), INDEX (rec_time)) When I do an: UPDATE table SET repeats=repeats+1 gen_time gets updated as well: mysql select id, gen_time, rec_time, repeats from table; ++++-+ | id | gen_time | rec_time | repeats | ++++-+ | 1 | 20020404164500 | 20020405111308 | 0 | ++++-+ 1 row in set (0.01 sec) mysql update table set repeats=repeats+1 where id='1'; Query OK, 1 row affected (0.01 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql update table set repeats=repeats+1 where id='1'; Query OK, 1 row affected (0.02 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql update table set repeats=repeats+1 where id='1'; Query OK, 1 row affected (0.02 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql select id, gen_time, rec_time, repeats from table; ++++-+ | id | gen_time | rec_time | repeats | ++++-+ | 1 | 20020405112158 | 20020405111308 | 3 | ++++-+ 1 row in set (0.02 sec) Is this a bug or am I forgetting something? - 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: Problems with UPDATE in v3.23.49 (is this a bug)
According to the manual, the DATETIME field can be stored As a string with no delimiters in either 'MMDDHHMMSS' or 'YYMMDDHHMMSS' format, provided that the string makes sense as a date. So this should provide you with the format you require. TIMESTAMP was created so that we would NOT have to make an extra call to NOW() when doing INSERTs Finally, you replied directly to me, instead of the list, but I'll forward to list here... As for my 2 cents, I prefer TIMESTAMP to do as it does -Original Message- From: Hihn Jason [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 10:48 AM To: 'Rick Emery' Subject: RE: Problems with UPDATE in v3.23.49 (is this a bug) Yes I did, but it is very long, and it was very long ago. Could someone please explain to me why this was done? It seems more confusing to do this than to not do this. Why when you can just say SET field=NOW() would anyone build this auto update of timestamps in? (the kicker is you HAVE to do it for all timestamps in a schema past the first) Additionally, what if I wanted the time stamp format (without formatting (spaces, colons, and dashes)) (which I do) A very illogical feature I must say... Anyone agree with me? -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 11:34 AM To: Hihn Jason; '[EMAIL PROTECTED]' Subject: RE: Problems with UPDATE in v3.23.49 (is this a bug) No, this is NOT a bug. According to the manual (you read it, right?), TIMESTAMP is created so that when a record is UPDATEd or INSERTed, the time of the change is entered into the record. If you want a date that does not changem use the DATE fiel -Original Message- From: Hihn Jason [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 10:33 AM To: '[EMAIL PROTECTED]' Subject: Problems with UPDATE in v3.23.49 (is this a bug) I have a table whose schema contains: id INTEGER AUTO_INCREMENT, gen_time TIMESTAMP, rec_time TIMESTAMP, repeats INTEGER DEFAULT 0, PRIMARY KEY (id), INDEX (rec_time)) When I do an: UPDATE table SET repeats=repeats+1 gen_time gets updated as well: mysql select id, gen_time, rec_time, repeats from table; ++++-+ | id | gen_time | rec_time | repeats | ++++-+ | 1 | 20020404164500 | 20020405111308 | 0 | ++++-+ 1 row in set (0.01 sec) mysql update table set repeats=repeats+1 where id='1'; Query OK, 1 row affected (0.01 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql update table set repeats=repeats+1 where id='1'; Query OK, 1 row affected (0.02 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql update table set repeats=repeats+1 where id='1'; Query OK, 1 row affected (0.02 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql select id, gen_time, rec_time, repeats from table; ++++-+ | id | gen_time | rec_time | repeats | ++++-+ | 1 | 20020405112158 | 20020405111308 | 3 | ++++-+ 1 row in set (0.02 sec) Is this a bug or am I forgetting something? - 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 maximum query size?
-Original Message- From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 4:02 PM To: [EMAIL PROTECTED] Subject: [PHP] MYSQL maximum query size? Is there a maximum number of characters you can use in a query? I have a giant query using the UPDATE command (updating about 120 different columns). I run this query of mine and nothing happens. No errors. No updates either. Thanks!! Phil - 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: Newbie table question
delete from tableB; INSERT INTO tableB SELECT * FROM tableeA; see manual: 6.4.3.1 INSERT ... SELECT Syntax INSERT [LOW_PRIORITY] [IGNORE] [INTO] tbl_name [(column list)] SELECT ... -Original Message- From: Graham Nichols [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 9:44 AM To: [EMAIL PROTECTED] Subject: Newbie table question Hi, I have a newbie question, to which my mysql books didn't have an answer! It is: I have two tables with identical structures. I wish to copy the data from table B into (append) table A. What sql statement will achieve this please? kind regards, Graham Nichols. - 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: Getting the most recent record per id before date X
SELECT * FROM mytable WHERE date_field now() id_field=ID ORDER BY date_field DESC -Original Message- From: Anthony R. J. Ball [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 10:30 AM To: [EMAIL PROTECTED] Subject: Getting the most recent record per id before date X I am trying to figure out the best way to select the row of data for a specific id that is the most recent entry on or before a specific date. I realize that I could create a temp table and select where date = X and group by id, inserting the max date into the table with the id, then do a join... but I am wondering if the thought I had would be a really nasty sneaky trick to do it in one query... As far as I can tell, group by returns the first row as it is ordered by the key? If this is true would it be possible to design the keying for this special case, such that the field I wanted would rise to the top in a normal group by? or am I being a heretic and shold buy a stone proof suit? Just one of those things I have to check up on... :) -- ___ __ ____ _ _ _ _ / __)( )( ) /__\( \/ )( ___) ( \( )( ___)(_ _) \__ \ )(__)( /(__)\\ / )__)) ( )__) )( (___/(__)(__)(__)\/ ()()(_)\_)() (__) Guess it's time for Plan B, huh? - 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: Query help
SELECT * FROM mytable WHERE first_name=$first last_name=$last -Original Message- From: Chuck Barnett [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 10:28 AM To: [EMAIL PROTECTED] Subject: Query help Hi. I have two fields, firstname, lastname. I populate a select box with the firstname lastname. Now when a user selects a name and hits submit, the program will(should) select * from table where the selected name equal firstname+lastname. I guess you have to some how put the first and last name together and compare the selected name to itI dunno Thanks for help with this query. Chuck - 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: SQl query in MySQL (1)
Use CHAR, not TEXT for Nombre and Password Also, INT will NOT be set to length of 1 in permiso -Original Message- From: Gastón Sancassano [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 12:10 PM To: [EMAIL PROTECTED] Subject: SQl query in MySQL (1) My name is Gastón Sancassano and I would like to make some questions about MySQL because I am a novice. My question is: - How does PRYMARY KEY and UNIQUE works? My problem is that I want to create a table with 3 columns (Nombre, Password and Permiso) and I don't like to have the name repeated (without case sensitive). I execute this in mysql: mysql CREATE TABLE Usuarios ( - Nombre TEXT NOT NULL, - Password TEXT NOT NULL, - Permiso INT(1), - PRIMARY KEY(Nombre)); and the error message is: ERROR 1170: BLOB column 'Nombre' used in key specification without a key length How can I create this table?. Thanks very much, Gastón - 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: Not null not working??
It is not inserting NULL. when $login is NULL or blank, then a a record, with emplogin equal to a string of zero characters is inserted, which is valid. A string with zero characters is NOT a NULL value. So, it is accepted. -Original Message- From: Andrew Hazen [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 3:03 PM To: [EMAIL PROTECTED] Subject: Not null not working?? Hi, I'm getting a weird effect in the task manager app we use internally. I have a table emp_tasktime which records work sessions on tasks. The column emplogin varchar(25) not null is intermittently allowing null entries for just one employee. The insert statement is: INSERT INTO emp_tasktime set task_id='$task_id_link', emplogin='$login', date_start='$date', time_start=sec_to_time(time_to_sec('$time')+10800) $login is the employee name. If it was blank, the sql statement would fail, but it doesn't, but when I look at the table the emplogin field is SOMETIMES blank where is should be Robyn. I'm perplexed. Andrew Hazen Database Developer Jatech Solutions Inc. 160 Bartley Drive Toronto, ON M4A 1E1 www.jatech.ca 416-288-9833 - 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: Help. I have truly blundered.
su as root then restart mysqld -Original Message- From: john [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 4:10 PM To: MySQL Lists Subject: Help. I have truly blundered. Please help with ignorance, I was in mysqld making some changes to a database. I run a Linux 6 box with MySQL 3 on it. I was logged in as user john, who has all access privelages to mysqld. John is not root, and I told mysql to stop. Well, mysql will not start again. What can I do? - 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: copying field x to field y for each record in table
UPDATE mytable SET field1=field2; -Original Message- From: Chuck Barnett [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 10:10 AM To: [EMAIL PROTECTED] Subject: copying field x to field y for each record in table Hi, how do I do the following: I have a table I have added a new field to, I want to take field X and copy it to the new field for each record. What should this query look like? Thanks, Chuck - 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: underline char in a [char][varchar][text] field ?
if your app is PHP, then use stripslashes() on field -Original Message- From: Pal Lucian [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 10:58 AM To: [EMAIL PROTECTED] Subject: underline char in a [char][varchar][text] field ? Hello everybody, I have a problem inserting a text from anywhere (application,console, doesn't matter) into a [char][varchar][text] field type. If I try to insert eg: 'hello_there.txt' in a field ot type I enlisted above ,when I read that field i get 'hello\_there.txt' and that is a big problem to me. The MySQl I use is a 3.23.49 (NT) Thankx in advance :) Sincerely yours Pal Lucian - 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: transactions, referntial integrity
no stored procedures yet. maybe vers 4.1 -Original Message- From: Kevin D [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 12:59 PM To: [EMAIL PROTECTED] Subject: transactions, referntial integrity I've been reading the docs but I just want to verify. It seems like the latest version of MySQL support transactions and referential integrity. Is this correct? Does MySQL now also support stored procedures? Thanks, Kevin - 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: BLOB in mysql
look at the manual, section : 6.4.9 LOAD DATA INFILE Syntax LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE 'file_name.txt' [REPLACE | IGNORE] INTO TABLE tbl_name [FIELDS [TERMINATED BY '\t'] [[OPTIONALLY] ENCLOSED BY ''] [ESCAPED BY '\\' ] ] [LINES TERMINATED BY '\n'] [IGNORE number LINES] [(col_name,...)] I've never done it, but you can load a file into a single field/column. -Original Message- From: chiou%2dguey liaw [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 12:48 PM To: [EMAIL PROTECTED] Subject: BLOB in mysql Hi, I am trying to store a .gz file in a BLOB field in a mysql database. I have tried two commands : 1. Insert into mytable values('1', 'file1.gz'); 2 Insert into mytable values('1,','\'file1.gz\''); These two commands just store the name of the file in the BLOB field instead of the content of the file. How should I do my Insert statement 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 - 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 sorting by a column name
$r = mysql_query(SELECT * FROM hwureviews ORDER BY category,num DESC); what are you trying to do with this statement?: while ($info = mysql_fetch_row($max)) { -Original Message- From: Alex Behrens [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 4:08 PM To: [EMAIL PROTECTED] Subject: help sorting by a column name Hey Guys, I need to reorganize the list of reviews on my site so they are displayed by category. However, I want it to display all the reviews from all categories at once. How do I do this? Here is my syntax now for display all reviews at once, but not sorted by category: ?php $db = mysql_connect( db32.pair.com, **, ); mysql_select_db( net3dual_reviews,$db); $r = mysql_query(SELECT * FROM hwureviews ORDER BY num DESC); $max = mysql_query(select max(num) from hwureviews,$db); while ($info = mysql_fetch_row($max)) { printf (bfont color='#ff'Hardware Reviews - %s Articles Total/b/fontbr, $info[0]); } while($a=mysql_fetch_array($r)) { printf (- a href=\%s\%s/a (Written by: a href=\mailto:%s\;%s/a) - [a href='%s' onMouseOver='if (window.event || document.layers) show(\%s\,event)' onMouseOut='hide(\%s\)'Description/a]br,$a[url],$a[name],$a[ema il],$a[author],$a[url],$a[name],$a[name]); } ? I want it so it displays them like this: Processors - Reviews listed here Motherboards Reviews listed here the categories are stored under the column name category, for reference. Thanks! -Alex Big Al Behrens E-mail: [EMAIL PROTECTED] Urgent E-mail: [EMAIL PROTECTED] (Please be brief!) Phone: 651-482-8779 Cell: 651-329-4187 Fax: 651-482-1391 ICQ: 3969599 Owner of the 3D-Unlimited Network: http://www.3d-unlimited.com Send News: [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
RE: multiple delete for mysql
mysql version 4.x does this -Original Message- From: David yahoo [mailto:[EMAIL PROTECTED]] Sent: Monday, April 01, 2002 5:28 PM To: [EMAIL PROTECTED] Subject: multiple delete for mysql Hi all, How can i do a delete from multiple table in mysql? Eg : I want ot delete record something like that I dont when to select but delete delete from externallink as link, topic as topic, topiclink as joiner where link.resid = joiner.resid and topic.catid = joiner.catid and topic.rid like %Industry%; I want to delete row from link joiner and topic too on cascad that correspond to that. Or have i to do 3 delete ? delete from topic where rid like %industry% and now how to delete ? where topic.id not in joiner ? and finaly how to delete link that doesnt have their id in joiner ? Thanks. _ 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 - 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: easy query question
select id, shortdescription, title from reviews where title REGEXP '^[0-9#$].*' ORDER BY title ASC -Original Message- From: Jay Paulson [mailto:[EMAIL PROTECTED]] Sent: Monday, April 01, 2002 6:32 PM To: [EMAIL PROTECTED] Subject: easy query question I want to do a query that will find all the titles I have in my db that start with numbers and ambigious characters (i.e. 0-9, , #, $ etc...). My query is below, however I don't know what to change the a too in order for it to return what I just described. select id, shortdescription, title from reviews where title LIKE UPPER(\a%\) ORDER BY title ASC Thanks for any help. - 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: insert delayed and timestamps
What happened when you tried this experiment? -Original Message- From: Viraj Alankar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 8:50 AM To: [EMAIL PROTECTED] Subject: insert delayed and timestamps Hello, When using 'insert delayed' syntax and there is a timestamp field in the table but not specified in the insert query, which timestamp is actually used when the record ends up in the destination table? In other words, will the timestamp value be the actual timestamp that the record was inserted into to the destination table (i.e. unknown at insert time) or the temporary 'delayed' table? It seems logical it would use the delayed table timestamp value, but I would like to confirm. sql Viraj. - 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: need some help...
$retval = .= nbsp;nbsp;nbsp;nbsp;a href=\.$a[url]. \img src=\.$a[picurl].\border=\0\/abrnbsp;nbsp;. - a href=\.$a[url].\.$a[title]./abrbr; -Original Message- From: Alex Behrens [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 3:46 PM To: [EMAIL PROTECTED] Subject: need some help... Hey Guys, I need help indentifiying why I have an error in this line of syntax: while($a=mysql_fetch_array($r)) { $retval.=nbsp;nbsp;nbsp;nbsp;a href=\%s\img src=\%s\ border=\0\/abrnbsp;nbsp;- a href=\%s\%s/abrbr,$a[url],$a[picurl],$a[url],$a[title]); } It just gives me a parse error on the page for the $retval. = line Thanks! -Alex Big Al Behrens E-mail: [EMAIL PROTECTED] Urgent E-mail: [EMAIL PROTECTED] (Please be brief!) Phone: 651-482-8779 Cell: 651-329-4187 Fax: 651-482-1391 ICQ: 3969599 Owner of the 3D-Unlimited Network: http://www.3d-unlimited.com Send News: [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
RE: Why does my delete not work :(
From the manual: DELETE [LOW_PRIORITY | QUICK] FROM table_name [WHERE where_definition] [ORDER BY ...] [LIMIT rows] Please note: there can be no SELECT clause.. -Original Message- From: sunny [mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 8:15 AM To: [EMAIL PROTECTED] Subject: Why does my delete not work :( Hi all! I've got this piece of SELECT statement for MySql. SELECT * FROM messages LEFT OUTER JOIN main ON messages.topicid=main.topicid WHERE main.topicid is null; so the select statement works fine. But what I'd like to do is actually delete those rows instead. but substituting SELECT with DELETE doesn't work :( Please help! i'm pulling out my hair - 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: Queries help (part II)
$query = SELECT * FROM gigs WHERE date '$today' ORDER BY date ASC LIMIT 3; -Original Message- From: David Rice [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 2:20 PM To: [EMAIL PROTECTED] Subject: Queries help (part II) Hey thanks i got it to work sort of $query = SELECT * FROM gigs WHERE date '$today' ORDER BY date DESC LIMIT 3; that works but i want it to show them ascending and when i change it to $query = SELECT * FROM gigs WHERE date '$today' ORDER BY date ASC; DESC LIMIT 3; it doesn't work any thoughts? _ Send and receive Hotmail on your mobile device: http://mobile.msn.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 - 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: Enforcing Column Types
I have a column that is VARCHAR(32). I use it to store MD5 hash values. MD5 hashes are always 32 byte. So use char(32) instead. I do. -Original Message- From: Joel Rees [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 11:30 PM To: Tino Didriksen Cc: [EMAIL PROTECTED] Subject: Re: Enforcing Column Types Tino Didriksen queried: I have a column that is VARCHAR(32). I use it to store MD5 hash values. MD5 hashes are always 32 byte. In other words, that's 1 byte wasted because it's VARCHAR. With 2500 entries and more on the way, that's at least 2500 byte wasted. 2500 bytes out of 82,500? Three percent. How valuable is that 3%? How does it balance with other wasted space in the table? Total space? Is there no way to enforce a column type around the silent changes? You do understand the trade-offs involved in allowing variable length records in a database? that the database software has to either allocate the maximum width for each variable length field, or use an additional level of indirection in the indexing? Just a thought. Joel Rees Alps Giken Kansai Systems Develoment Suita, Osaka Filter fodder: sql,query (I thought the filter also accepted "database" and various sql commands, MySQL data types and things? Has the filter gone strict on us?) - 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: What is wrong in this query???
You cannot update multiple tables in a single UPDATE. Did you read the manual? -Original Message- From: Javier Armendáriz [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 2002 2:04 PM To: MySQL Subject: What is wrong in this query??? Can someone tellme the problem in this query?? Is there any problem updating two tables in the same query??? update alumno, alumnocurso set alumno.nombre='Blas', alumno.apellidos='Martinez Maertinez', alumno.nacimiento='1990-09-12', alumno.telefono = '6', alumnocurso.incorporacion = '2002-3-16', alumnocurso.finalizacion='-0-0', alumnocurso.observaciones = 'Observaciones id 4' where alumno.id = '4' and alumnocurso.id = '4' and alumno.id = alumnocurso.id_alumno ; - 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: problems deleting a user from user db
delete from user where user=wus; -Original Message- From: Manuel Hendel [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002 12:24 PM To: MYSQL List Subject: problems deleting a user from user db I got problems deleting a user which I've created before. mysql delete from user where user=wus; ERROR 1054: Unknown column 'wus' in 'where clause' mysql Can anyone provide some help? Thanks, Manuel -- 667: The neighbor of the beast. - 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: querying check constraints
I don't understand your question -Original Message- From: Sukhdev Sethi [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 7:20 AM To: [EMAIL PROTECTED] Subject: querying check constraints Hi, I have created a table as below: create table myTable ( Field1 int auto_increment not null, Field2 varchar(25) not null, Field2 enum('Fair','Good','Excellent'), primary key (Field1)) auto_increment=1 I would like to know how to query the table for only the enum values I have created. Sukhdev. __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.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 - 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 do when the table files become bigger and bigger
What is the problem you wish to resolve? Define it. -Original Message- From: Buding Chen [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 6:33 AM To: [EMAIL PROTECTED] Subject: how to do when the table files become bigger and bigger Hi, all: I am doing a project that we will insert a lot of data to mysql every day, so the table files will become bigger and bigger, it will not only take a long time to query,but also lead to the file size limits. So how to resolve it? Are there some artiles related? Thanks for any help. B.R. budingc - 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: Query syntax help
AND date = 2002-03-17; -Original Message- From: rory oconnor [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 10:49 AM To: mysql list (choose midget) Subject: Query syntax help I'm trying to figure out a query that will tell me the total number of people in our house email file that physically opted out in the last week. I'm a bit of a mysql newbie as you can tell... This is the general concept, though it doesn't seem to work: select count(id) from contact # my data table where optin='no'# shows they are an opt-out AND bad_email IS NULL # is ticked if it was a bounceback opt-out AND email IS NOT NULL # show only for records that have emails AND date = 2002-03-17; # show data only since last sunday I appear to be getting hung up on the date part. I'm not sure if I can use that kind of operator on a date with that format. Any help is appreciated! Thanks, Rory - 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: Cannot access the Database on same Machine
this file is created when MYSQL starts check the directory to ensure it has the correct read-write permissions check the list archives; this question has been asked almost every day -Original Message- From: colin o [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 3:05 PM To: mysql Subject: Cannot access the Database on same Machine Hi, When i try to access the database which is on my Linux machine i get the following error: ERROR 2002; Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) There is nothing in this file, although i dont know how to edit it. I have gone through the Manual pages and the lists, all the searches for this type of ERROR, but to no avail. I have used the database before and have tables in there but for some reason i cannot get in. I don't want to reinstall it as i have tables that i need, I am really stuck so any help will be very much appreciated, Thanks Colin __ Do You Yahoo!? Yahoo! Sports - live college hoops coverage http://sports.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 - 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: [PHP-DB] Delete problem
MySQL does not currently support sub-selects. The manual says: DELETE [LOW_PRIORITY | QUICK] FROM table_name [WHERE where_definition] [ORDER BY ...] [LIMIT rows] Did you review the manual first? -Original Message- From: Riccardi Moreno [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 13, 2002 9:48 AM To: Php List; Mysql List Subject: [PHP-DB] Delete problem Hi all, I'm trying to delete records with this query on php program: delete from Bands where ID_ALBUM IN (select ID_ALBUM from Albums where ID_GROUP = '$group') I use it on MSSQL and work fine but on mysql don't work, there's some other query that make the same result on mysql Thank's all - Moreno Riccardi - www.webtrade.it -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.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: starting mysql
ensure that /tmp has correct read-write-execute permissions -Original Message- From: Hresko, Christian A. [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 13, 2002 10:57 AM To: '[EMAIL PROTECTED]' Subject: starting mysql i'm moving MySQL over to unix and i can't for the life of me get anything to work. i just want to use MySQL from my directory. no root users or anything like that. i just want to noodle around with the db as a 'local' user. so i installed the binaries, created my symbolic link, configured the db, and tried starting with mysql. (and safe_mysqld and safe_mysqld --user=mysqladmin) i receive a ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) i checked with my admin, and the socket exists. prior to this, we tried configuring the root user, changed owners, groups, etc and still no luck. (different error messages... usually tried starting with a password, password failed (password = YES) error... went through all the documented changes necessary to avoid this message. still got this message. gave up) any help would be appreciated. thanks, christian : yes, i've read the manual. and i'm reading the MySQL book - 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: How to pass mysql connections across exec()
have you tried forking the process, then terminating the parent? All open file desciptors, including sockets, would be available to the child. The child would contain the code in try1.c. -Original Message- From: Manvendra Bhangui [mailto:[EMAIL PROTECTED]] Sent: Monday, March 11, 2002 5:22 AM To: [EMAIL PROTECTED] Subject: How to pass mysql connections across exec() Hi, I have a requirement where I should be able to open connection to mysql from a server which is running continuously and pass the connection to a child of this server after it does a exec to a totally different executable. This will enable me to reuse a mysql connection initiated by one process and used by another process - which though is a child of the first process but is a totally different executable. Thus, I will be able to initiate connection pooling for a daemon like smtp without keeping on initiating mysql_real_connect() on each and every mail. I have done this by doing mysql_init() and mysql_real_connect() in the parent. In the exec'ed process, I do mysql_init() followed my vio_new() and my_net_init(). The above logic works for me, But i am not sure if I am doing the right thing. Also there is a difference in the some of the values of the mysql structure in parent and the child. Also enclosing two programs try.c and try1.c, which demonstrate the above. try does a mysql_real_connect() to open a mysql_connection with socket descriptor 3. The program try1 the uses this same descriptor to restablish the connection to the mysqld server without initiating a new socket connection. The output of the mysql structure by try is hostlocalhost uservpopmail passssh-1.5- sock/tmp/mysql.sock vers4.0.0-alpha-log Host Info Localhost via UNIX socket info(null) db vpopmail Affected Rows 0 Insert id 0 extra_info 0 thread_id 103 packet_length 0 port3306 client_flag 8333 server_capabilities 44 Protocol version10 Field Count 0 Server Status 2 Server Language 8 Mysql Status0 Free me 0 Reconnect 1 Scramble0Q,$n~OR The output of the mysql structure by try1 is hostlocalhost uservpopmail passssh-1.5- sock/tmp/mysql.sock vers Host Info Localhost via UNIX socket info(null) db (null) Affected Rows 0 Insert id 0 extra_info 0 thread_id 0 packet_length 0 port3306 client_flag 8333 server_capabilities 0 Protocol version10 Field Count 0 Server Status 2 Server Language 0 Mysql Status0 Free me 0 Reconnect 1 Scramble As you can see the following variables are not getting set in the exec'ed process. mysql.server_version mysql.thread_id mysql.server_language mysql.scramble_buff Is there anyting i am missing? (However, the program works fine and the query also works fine. The mysql show process list also shows that the connection is being reused. However I am not sure, if this method could cause any problems). The programs try.c and try1.c are below /* try.c */ #include stdio.h #include fcntl.h #include mysql.h main() { MYSQL mysql; mysql_init(mysql); if (!(mysql_real_connect(mysql, localhost, vpopmail, ***, vpopmail, 3306, 0, 0))) { fprintf(stderr, mysql_real_connect: %s\n, mysql_error(mysql)); return(1); } printf(host%s\n, mysql.host); printf(user%s\n, mysql.user); printf(pass%s\n, mysql.passwd); printf(sock%s\n, mysql.unix_socket); printf(vers%s\n, mysql.server_version); printf(Host Info %s\n, mysql.host_info); printf(info%s\n, mysql.info); printf(db %s\n, mysql.db); printf(Affected Rows %d\n, mysql.affected_rows); printf(Insert id %d\n, mysql.insert_id); printf(extra_info %d\n, mysql.extra_info); printf(thread_id %d\n, mysql.thread_id); printf(packet_length %d\n, mysql.packet_length); printf(port%d\n, mysql.port); printf(client_flag %d\n, mysql.client_flag); printf(server_capabilities %d\n, mysql.server_capabilities); printf(Protocol version%d\n, mysql.protocol_version); printf(Field Count %d\n, mysql.field_count); printf(Server Status %d\n, mysql.server_status); printf(Server Language %d\n, mysql.server_language);
RE: auto increment problem
1. The auto_increment will not occur on failure. Try it yourself to verify; I did. 2. When you delete a row, you DO NOT WANT the auto-increment to re-number. You SHOULD have gaps. Why? Because if the auto_incremented field is a primary key, and there are other tables who fields refer to that field, you WANT those links to remain valid. Otherwise, the fields in the other tables will NO LONGER point-to the records they originally pointed to. -Original Message- From: Chetan Lavti [mailto:[EMAIL PROTECTED]] Sent: Monday, February 25, 2002 1:15 PM To: [EMAIL PROTECTED] Subject: auto increment problem hi, I creating a table where I am using one field as Auto Increment. I want to know two things or rather I want to do to thinks for the same column 1. When I am inserting the values and the Query fails, the increment should not took place and 2. When I delete a particular row from the table there should not be any gap in the auto increment sequence. Is it possible..?? I am not much enthusiastic about the second one because I don't think that I will use it. Anyone who can help me out for this.?? Thanks and regards, Cretan Latvia - 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: MySQL Book
MySQL by Paul DuBoise Paul monitors this mailing list, so if you have questions concerning what you've read, he may answer. -Original Message- From: Danis Stéphane (NHQ-AC) [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 1:08 PM To: Mysql (E-mail) Subject: MySQL Book Any book you guys recommend for learning the specific strenght of MySQL, I'm have a Oracle background and would like to learn more on MySQL. Stephane SQL, Query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - 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 Book
oops... Do I get credit for capitalizing the B in DuBois? GRIN -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 3:57 PM To: Rick Emery; 'Danis Stéphane '; Mysql (E-mail) Subject: RE: MySQL Book At 13:25 -0600 2/21/02, Rick Emery wrote: MySQL by Paul DuBoise Paul monitors this mailing list, so if you have questions concerning what you've read, he may answer. You added an e to my name deliberately just to see if I'd reply, didn't you! :-) -Original Message- From: Danis Stéphane (NHQ-AC) [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 1:08 PM To: Mysql (E-mail) Subject: MySQL Book Any book you guys recommend for learning the specific strenght of MySQL, I'm have a Oracle background and would like to learn more on MySQL. Stephane SQL, Query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Linking tables using INNER JOIN
try: select * from MapConfig mc LEFT JOIN ConfigString USING (id) LEFT JOIN ConfigInt cf on mc.id=cf.id WHERE MapConfig.layername = Roads; -Original Message- From: Christopher Thompson [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 4:24 PM To: [EMAIL PROTECTED] Subject: Linking tables using INNER JOIN I am trying to do an inner join between three tables. Here is what I have tried: select * from MapConfig LEFT JOIN ConfigString USING (id) LEFT JOIN ConfigInt USING (id) WHERE MapConfig.layername = Roads; What I am trying to do is to pull back all rows from MapConfig associated with matching rows from ConfigInt and ConfigString. What I get, though, is info from MapConfig and ConfigString ONLY, nothing from ConfigInt. If I rearrange the order that ConfigString and ConfigInt appear, I get info from MapConfig and ConfigInt ONLY, nothing from ConfigString. Is my SQL messed up or is there a limitation in MySQL on the number of INNER JOINs you can do in one statement? I suppose I could probably use a temporary table for this but I'd rather not. - 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: basic query question
assuming that engaedto refers to an id, your query might be: SELECT a.lname,a.fname,b.engagedto FROM mydata a LEFT JOIN mydata b ON(a.id=b.engagedto); -Original Message- From: Dean Householder [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 11:22 AM To: [EMAIL PROTECTED] Subject: basic query question I'm fairly new to MySQL, so if anyone could help me I'd really appreciate it! What I'm trying to do is join two pictures in a database to each other. My database holds info about people with variables: id, lname, fname, engagedto, pic The engagedto field contains the id of the person they are engaged to. I'm trying to print the people that are engaged to each other next to each other. I've played with the join command and a little with group but don't really understand how these work... If anyone could point me in the right direction regarding how to query the database to return these records connected to each other, I would really appreciate it! Thanks so much Dean - 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: appropriate datatype - blob/text?
do you need to search on it? If not, perhaps storing these files separately with a pointer storedd in the database. This will improve searching speed I understand. -Original Message- From: Lee [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 10:29 AM To: MySQL Subject: appropriate datatype - blob/text? Hi, I wonder if someone could offer me some advice. One of the requirements for my database is that it must store (in one field) the contents of a text file (never exceeding 1MB). The data is obviously plain text format, and is in the following format: .010 .1083649E+03 .2186916E+02 .0013470 .1993729E+03 .2738670E+02 .0026940 .5308654E+03 .7280664E+02 . . .0040410 .2063586E+04 .2057984E+03 I would like to know what the most suitable and/or efficient method of storage would be. I am assuming BLOB or TEXT. Any advice would be greatly appreciated. - Best regards, Lee bypass_filter sql,query /bypass_filter - 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: basic query question
select id, lname, fname, pic from database where engagedto=id; Sorry, mate, that won't work. That will find folks who are engaged to themselves, i.e., narcissists -Original Message- From: Oliver Heinisch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 11:30 AM To: [EMAIL PROTECTED] Subject: Re: basic query question At 19.02.2002 10:22, you wrote: I'm fairly new to MySQL, so if anyone could help me I'd really appreciate it! What I'm trying to do is join two pictures in a database to each other. My database holds info about people with variables: id, lname, fname, engagedto, pic Try this, even if I´m careful due to my bad day, see todays threads ;-) select id, lname, fname, pic from database where engagedto=id; The engagedto field contains the id of the person they are engaged to. I'm trying to print the people that are engaged to each other next to each other. I've played with the join command and a little with group but don't really understand how these work... If anyone could point me in the right direction regarding how to query the database to return these records connected to each other, I would really appreciate it! Thanks so much Dean - 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: v3.22.32 and temp tables
From the manual: In MySQL Version 3.23, you can use the TEMPORARY keyword... Sorry, mate, you are SOL until you upgrade -Original Message- From: Brian Warn [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 12:09 PM To: 'MySQL List' Subject: v3.22.32 and temp tables Hi, I want to build a temp table which I can query to sum values. If I try create temporary table tbl_name select some_query_here, then I get an error that tells me that I have an error with my sql syntax near 'temporary table tbl_name select some_query_here'. Am I correct in thinking that this is due to the version of mysql I'm using? (No, I can't upgrade it at this point). I wasn't successful in finding the answer to my dilemma at www.mysql.com/doc/manual.php. Thanks, Brian - 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: basic query question
You're very close: mysql select p1.lname, p1.fname, p2.lname as engaged_lname, p2.fname as engaged_fname from members p1, members p2 where p1.id = p2.engagedto; but the REAL question is What do you want out of the query? -Original Message- From: Dean Householder [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 1:53 PM To: Roger Karnouk; [EMAIL PROTECTED] Subject: Re: basic query question Okay, so I do this and all I end up with is +-+---+-+---+ | id | lname | fname | engagedto | +-+---+-+---+ | 131 | Hallows | Samuel | 131 | | 273 | Simmons | Maria | 273 | | 221 | Papa | Sharla | 221 | | 18 | Biehl | Ruth| 18| | 302 | Vance | Alicia | 302 | | 123 | Goettl| Christopher | 123 | | 78 | Ellsworth | Morgan | 78| | 204 | Millet| David | 204 | +-+---+-+---+ 8 rows in set (0.00 sec) The returning query doesn't seem very helpful. I guess what I want is mysql to return the results with each person they are engaged to in order. I added the p1.id and p1.engagedto fields. mysql select p1.id, p1.lname, p1.fname, p1.engagedto, p2.engagedto from members p1, members p2 where p1.id = p2.engagedto; +-+---+-+---+---+ | id | lname | fname | engagedto | engagedto | +-+---+-+---+---+ | 131 | Hallows | Samuel | 18| 131 | | 273 | Simmons | Maria | 78| 273 | | 221 | Papa | Sharla | 123 | 221 | | 18 | Biehl | Ruth| 131 | 18| | 302 | Vance | Alicia | 204 | 302 | | 123 | Goettl| Christopher | 221 | 123 | | 78 | Ellsworth | Morgan | 273 | 78| | 204 | Millet| David | 302 | 204 | +-+---+-+---+---+ 8 rows in set (0.01 sec) This at least shows me the info I had in my original table. If I looked at it I could see that id# 131 should match up with id# 18 and such. I guess I'm looking for a query that will match these to up either in the same row or one after another. Any help is SOOO appreciated! Dean - Original Message - From: Roger Karnouk [EMAIL PROTECTED] To: Dean Householder [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, February 19, 2002 12:17 PM Subject: RE: basic query question you will have to join the table with itself and reference it as if it is two tables. this might be slow however so you might want to make some specific indexes to speed it up. This Query will return all the people who are engaged and a picture of their fiancé: select p1.lname, p1.fname, p1.pic, p2.pic from people p1, people p2 where p1.id = p2.engagedto; this query will return people whether they are engaged or not: select p1.lname, p1.fname, p1.pic, p2.pic from people p1 left join people p2 on (p1.id = p2.engagedto); -Original Message- From: Dean Householder [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 12:22 PM To: [EMAIL PROTECTED] Subject: basic query question I'm fairly new to MySQL, so if anyone could help me I'd really appreciate it! What I'm trying to do is join two pictures in a database to each other. My database holds info about people with variables: id, lname, fname, engagedto, pic The engagedto field contains the id of the person they are engaged to. I'm trying to print the people that are engaged to each other next to each other. I've played with the join command and a little with group but don't really understand how these work... If anyone could point me in the right direction regarding how to query the database to return these records connected to each other, I would really appreciate it! Thanks so much Dean - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble
RE: Copying the structure of DBs
CREATE TABLE newtable SELECT * FROM oldtable LIMIT 0; -Original Message- From: Todd Ellner [mailto:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 12:58 PM To: [EMAIL PROTECTED] Subject: sql: Copying the structure of DBs I need to create multiple databases from time to time. This isn't a problem. The thing that seems tricky is creating databases with the same table names and structures, but none of the data, of old ones. I thought chapter 4 of the documentation covered this, but it doesn't quite seem to. Any suggestions? Is there a quick way to do this in MySQL? Or will I have to do something kludgy like parsing the output of a mysql DESCRIBE statement and making a create statement out of it? Todd - 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: RPMS for Development Branch
and the URL is??? it's not www.codemonsters.net; I just checked -Original Message- From: Brian P. Austin [mailto:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 3:20 PM To: [EMAIL PROTECTED] Cc: mysql Subject: RPMS for Development Branch Hello all, I have finished setting up a web page that contains RPMS for the Development Branch of MySQL-4.0. These RPMS are compiled every night at 11:00 p.m. CST and are posted to the site at 12:00 a.m. CST. They are built on a standard RedHat 6.2 install. You must use RPM version 4 to install. the Perl dependancy error is still there so --nodeps will bypass it. I have also installed them sucessfuly on RedHat 7.2. I did this myself, and MySQL is not responsible if they do not work. So do not mail the lists if there is an install error, or a specific feature that is not enabled. such requests should be sent to [EMAIL PROTECTED] I did this in hopes of making things easier for people (and myself) who want to try the new stuff out without downloading and compiling themselves. Have fun. Brian P. Austin query, mysql, server - 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: connections to MySQL
does your test app connect with root as the user? -Original Message- From: Lonnie Cumberland [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 12:12 PM To: [EMAIL PROTECTED] Subject: connections to MySQL Hello All, I am new to this list and hope that someone could answer this question for me. I am running on a fresh install of Redhat 7.2 and am trying to connect to MySQL from a program that I have to test the connections, but am getting error messages saying that the host in not allowed to connect to this MySQL server. This is strange because I ran my test app on the same machine that the MySQL server is running. Is there some file that I must modify to tell MySQL to accept connections from various machines including localhost? Also, does some one have a simple test program that they know works that I might be able to use to try and connect to a simple database? I need to validate my app is working correctly. Thanks in advance, Lonnie -- Lonnie Cumberland OutStep Technologies Incorporated (313) 832-7366 URL: http://www.outstep.com EMAIL: [EMAIL PROTECTED] : [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
RE: Left Join problem - Please Help
Show us your table structure, some table values and the SELECT statement that works and the one that doesn't -Original Message- From: Miretsky, Anya [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 12:13 PM To: '[EMAIL PROTECTED]' Subject: Left Join problem - Please Help Whenever I try to issue a query which has a left join for two tables and a where clause for a column in the second table that is a varchar the query runs indefinitely. If I change the where clause to search on a numeric type column the query runs and returns expected values. Does anyone know what I am doing wrong? This is my first time using Mysql, so if this isn't the right list to post on, please tell me where I can post beginner mysql questions. Thanks for your help in advance. Anya Miretsky Computer Technology Dept. Brooklyn Botanic Garden 1000 Washington Avenue Brooklyn, NY 11225 (718)623-7265 [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
RE: When does the timestamp field gets updated?
timestamp is automatically updated -Original Message- From: George Labuschagne [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 1:20 PM To: [EMAIL PROTECTED] Subject: When does the timestamp field gets updated? Hi all, If one uses the timestamp data type for a column inside a table, when executing an update query on said table on a spesific record, will the timestamp column be updated as well or will it retain its first value? Thanks for any info in advance, George mysql, query, sql - 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: Left Join problem - Please Help
I don't think it's hanging. I think it's going through the process of determining joint criteria for 11,900 table entries multiplied by 88,000 other table entries, then doing a text search on the result, which is much slower than an integer search. I'm posting this back to the mysql list to see what the experts think. -Original Message- From: Miretsky, Anya [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 2:17 PM To: 'Rick Emery' Subject: RE: Left Join problem - Please Help Biblio has 11,901 and keyword has 87,971, also I indexed the keyword column in the keyword table. Is the fact that I have the same name for a column as for the table possibly a problem? -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 3:17 PM To: 'Miretsky, Anya' Subject: RE: Left Join problem - Please Help How many records are in these tables? -Original Message- From: Miretsky, Anya [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 1:51 PM To: 'Rick Emery' Subject: RE: Left Join problem - Please Help Table structure would be: Biblio table with the following columns: p_biblio int unsigned not null primary key, authors varchar(255), title varchar(255) , citation varchar(255) Keyword table with the following columns: p_keyword int unsigned not null primary key, fk_biblio int unsigned not null, Keyword varchar(255) Sql statement that works: Select distinct biblio.* from biblio left join keyword on biblio.p_biblio=keyword.fk_biblio where fk_biblio3; Sql statement that doesn't work - msql hangs executing this: Select distinct biblio.* from biblio left join keyword on biblio.p_biblio=keyword.fk_biblio where keyword=SOMESTRING; -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 2:10 PM To: 'Miretsky, Anya'; '[EMAIL PROTECTED]' Subject: RE: Left Join problem - Please Help Show us your table structure, some table values and the SELECT statement that works and the one that doesn't -Original Message- From: Miretsky, Anya [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 12:13 PM To: '[EMAIL PROTECTED]' Subject: Left Join problem - Please Help Whenever I try to issue a query which has a left join for two tables and a where clause for a column in the second table that is a varchar the query runs indefinitely. If I change the where clause to search on a numeric type column the query runs and returns expected values. Does anyone know what I am doing wrong? This is my first time using Mysql, so if this isn't the right list to post on, please tell me where I can post beginner mysql questions. Thanks for your help in advance. Anya Miretsky Computer Technology Dept. Brooklyn Botanic Garden 1000 Washington Avenue Brooklyn, NY 11225 (718)623-7265 [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
RE: Left Join problem - Please Help
possibly -Original Message- From: Miretsky, Anya [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 2:32 PM To: 'Rick Emery' Subject: RE: Left Join problem - Please Help When I do this without specifying a left join with just :select biblio.* from biblio,keyword where p_biblio=fk_biblio and keyword=somestring; it works fairly fast, is it the left join that's making it so slow? -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 3:29 PM To: 'Miretsky, Anya' Cc: '[EMAIL PROTECTED]' Subject: RE: Left Join problem - Please Help I don't think it's hanging. I think it's going through the process of determining joint criteria for 11,900 table entries multiplied by 88,000 other table entries, then doing a text search on the result, which is much slower than an integer search. I'm posting this back to the mysql list to see what the experts think. -Original Message- From: Miretsky, Anya [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 2:17 PM To: 'Rick Emery' Subject: RE: Left Join problem - Please Help Biblio has 11,901 and keyword has 87,971, also I indexed the keyword column in the keyword table. Is the fact that I have the same name for a column as for the table possibly a problem? -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 3:17 PM To: 'Miretsky, Anya' Subject: RE: Left Join problem - Please Help How many records are in these tables? -Original Message- From: Miretsky, Anya [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 1:51 PM To: 'Rick Emery' Subject: RE: Left Join problem - Please Help Table structure would be: Biblio table with the following columns: p_biblio int unsigned not null primary key, authors varchar(255), title varchar(255) , citation varchar(255) Keyword table with the following columns: p_keyword int unsigned not null primary key, fk_biblio int unsigned not null, Keyword varchar(255) Sql statement that works: Select distinct biblio.* from biblio left join keyword on biblio.p_biblio=keyword.fk_biblio where fk_biblio3; Sql statement that doesn't work - msql hangs executing this: Select distinct biblio.* from biblio left join keyword on biblio.p_biblio=keyword.fk_biblio where keyword=SOMESTRING; -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 2:10 PM To: 'Miretsky, Anya'; '[EMAIL PROTECTED]' Subject: RE: Left Join problem - Please Help Show us your table structure, some table values and the SELECT statement that works and the one that doesn't -Original Message- From: Miretsky, Anya [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 12:13 PM To: '[EMAIL PROTECTED]' Subject: Left Join problem - Please Help Whenever I try to issue a query which has a left join for two tables and a where clause for a column in the second table that is a varchar the query runs indefinitely. If I change the where clause to search on a numeric type column the query runs and returns expected values. Does anyone know what I am doing wrong? This is my first time using Mysql, so if this isn't the right list to post on, please tell me where I can post beginner mysql questions. Thanks for your help in advance. Anya Miretsky Computer Technology Dept. Brooklyn Botanic Garden 1000 Washington Avenue Brooklyn, NY 11225 (718)623-7265 [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
RE: re-ordering rows
Why is the internal order important? When SELECTing, the internal order is of no importance to MYSQL. It does not speed-up the query or access. When discussing relational database systems, all that matters is the order of output. -Original Message- From: Victoria Reznichenko [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 9:26 AM To: [EMAIL PROTECTED] Subject: re-ordering rows Bryan, Thursday, February 14, 2002, 4:54:11 PM, you wrote: BM Greetings, BM How do I get the rows in a table to be in a different BM order? I know I can sort a SELECT statement with an BM ORDER BY clause, but how do I make this a permanent BM adjustment to the table, so that all future SELECTs BM will produce ordered data? How does MySQL know what BM orders the rows are in (how are they actually stored), BM and how can I change that? You should use indexes. Look at: http://www.mysql.com/doc/M/y/MySQL_indexes.html BM Here's what's happening: say I have a table with an ID BM field like this: BM ID BM -- BM 1 BM 2 BM 3 BM 4 BM 5 BM Then I delete a few rows: BM ID BM -- BM 1 BM 2 BM 5 BM Now, if I insert new rows, they come out like this: BM ID BM -- BM 1 BM 2 BM 7 BM 6 BM 5 BM How do I get the table so that the inherent order of BM the rows (not just the output of a SELECT query with BM an ORDER BY) is numerical? BM -b -- 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 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
FW: [PHP] MySQL question...not sure if this is the correct forum to ask.
-Original Message- From: Peter Ruan [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 4:04 PM To: [EMAIL PROTECTED] Subject: [PHP] MySQL question...not sure if this is the correct forum to ask. Hi, Can the UPDATE statement have conditional check embedded in it? I have a page that displays a record (in a FORM format) that the user can change the information on each column. I want to check each column and see which has been changed and update the table for entries that were changed only. for each column data { if column is changed then update; else do nothing; } Maybe I am making this too complicated than it needs and just go ahead and update all of the columns regardless with the new values, regardless they are actually different or not. Thanks in advance, -Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.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: PHP does not see Table updates
Show us your code. What are your table structures like? -Original Message- From: AOK Lansing [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 12:37 PM To: [EMAIL PROTECTED] Subject: PHP does not see Table updates I am using PHP to access a MySQL DB. If I stop MySql and then restart it and then open my webpage the table values are correct. If I make a change to the table, close my browser and restart it, the table values are the old values. If I stop MySQL after changes and then restart it, all works well. What am I doing wrong? Thanks, Bob Hiller - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Can this be done?
What do your tables look like? Structure? What are you trying to do? What does your data look like? -Original Message- From: Ed Lazor [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 10, 2002 8:12 PM To: [EMAIL PROTECTED] Subject: Can this be done? I'm trying to update a database. Here's the query that's not working. Is there another way of doing it or is this impossible with MySQL? Thanks, -Ed update SiteIndex set SiteIndex.Visitors = Pages.Visitors where SiteIndex.Title = Documents.Title AND Pages.DocID = Documents.ID - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Reset auto_increment
The following deletes all records and re-starts renumbering from 1; DELETE FROM mytable; The following deletes all records and continues counting from where the table last left off: DELETE FROM mytable WHERE 1; If you are trying to restart numbering while not deleting records, forget-about-it. -Original Message- From: Wei Gao [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 2:10 PM To: [EMAIL PROTECTED] Subject: Reset auto_increment Hi, As I am new to MySQL, perhaps this is a common question you have been asked. I have a field Id which using auto_increment. Now I want to reset the value of auto_increment, that is the Id starts form 1 and does not skip the number. I have spent a few hours to find a way, but all failed. Could you please tell me how to do it? Wei _ Join the world's 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 [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Clear table contents
try: DELETE FROM relay_ip WHERE UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(rei_ts) 600; -Original Message- From: Odhiambo Washington [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 1:22 AM To: [EMAIL PROTECTED] Subject: Clear table contents Hello gurus, Please allow me to request for help with the table below. mysql select * from relay_ip; +-+++-+- + | rei_aid | rei_uname | rei_domain | rei_ip | rei_ts | +-+++-+- + | 1 | wash | alligator.wananchi.com | 62.8.64.4 | 2002-02-08 18:17:36 | | 2 | wash | alligator.wananchi.com | 62.8.64.108 | 2002-02-08 20:36:51 | | 3 | wash | alligator.wananchi.com | 62.8.64.108 | 2002-02-08 20:42:27 | | 4 | wash | alligator.wananchi.com | 62.8.64.108 | 2002-02-09 13:03:27 | | 5 | wash | alligator.wananchi.com | 62.8.64.108 | 2002-02-09 13:03:28 | | 6 | [EMAIL PROTECTED] | freebsd.co.ke | 62.8.64.108 | 2002-02-11 09:46:43 | | 7 | [EMAIL PROTECTED] | freebsd.co.ke | 62.8.64.108 | 2002-02-11 09:47:27 | +-+++-+- + I am looking for a way to clear each record that is older than 10 minutes by referring to the timestamp. Something that I can run from cron. tia -Wash S y s t e m s A d m i n. -- Odhiambo Washington [EMAIL PROTECTED]The box said 'Requires Wananchi Online Ltd. www.wananchi.com Windows 95, NT, or better,' Tel: 254 2 313985-9 Fax: 254 2 313922 so I installed FreeBSD. GSM: 254 72 743 223 GSM: 254 733 744 121 This sig is McQ! :-) ++ No problem is so formidable that you can't just walk away from 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 - 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: Clear table contents
something easier: DELETE FROM relay_ip WHERE NOW() - rei_ts 1000; -Original Message- From: Rick Emery Sent: Tuesday, February 12, 2002 3:03 PM To: 'Odhiambo Washington'; [EMAIL PROTECTED] Subject: RE: Clear table contents try: DELETE FROM relay_ip WHERE UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(rei_ts) 600; -Original Message- From: Odhiambo Washington [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 1:22 AM To: [EMAIL PROTECTED] Subject: Clear table contents Hello gurus, Please allow me to request for help with the table below. mysql select * from relay_ip; +-+++-+- + | rei_aid | rei_uname | rei_domain | rei_ip | rei_ts | +-+++-+- + | 1 | wash | alligator.wananchi.com | 62.8.64.4 | 2002-02-08 18:17:36 | | 2 | wash | alligator.wananchi.com | 62.8.64.108 | 2002-02-08 20:36:51 | | 3 | wash | alligator.wananchi.com | 62.8.64.108 | 2002-02-08 20:42:27 | | 4 | wash | alligator.wananchi.com | 62.8.64.108 | 2002-02-09 13:03:27 | | 5 | wash | alligator.wananchi.com | 62.8.64.108 | 2002-02-09 13:03:28 | | 6 | [EMAIL PROTECTED] | freebsd.co.ke | 62.8.64.108 | 2002-02-11 09:46:43 | | 7 | [EMAIL PROTECTED] | freebsd.co.ke | 62.8.64.108 | 2002-02-11 09:47:27 | +-+++-+- + I am looking for a way to clear each record that is older than 10 minutes by referring to the timestamp. Something that I can run from cron. tia -Wash S y s t e m s A d m i n. -- Odhiambo Washington [EMAIL PROTECTED]The box said 'Requires Wananchi Online Ltd. www.wananchi.com Windows 95, NT, or better,' Tel: 254 2 313985-9 Fax: 254 2 313922 so I installed FreeBSD. GSM: 254 72 743 223 GSM: 254 733 744 121 This sig is McQ! :-) ++ No problem is so formidable that you can't just walk away from 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 - 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: Duplicate Records
A quick method is to create a new table: CREATE TABLE newtable SELECT DISTINCT * FROM oldtable; note; manually verify newtable has your data. Then proceed: DROP TABLE oldtable; CREATE TABLE oldtable SELECT * FROM newtable; DROP TABLE newtable; -Original Message- From: Rich [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 10, 2002 10:31 AM To: MySql Subject: Duplicate Records How does one go about removing one of two identical records in a MySQL database? My mistake in an earlier database was not applying a unique number to each record (1, 2, 3, ---). I know it's possible to use the DISTINCT operator to show only one of the identical records in a result, but that does not remove one of them from the database. One thought that I had would be to add a unique number to each record, and that could probably be done manually, one record at a time, but is there a way to automate the process so that unique numbers could be assigned with one command? TIA Rich -- [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 - 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 list test - ignore
I apologize for using bandwidth...it appears my posts are no longer going to the [EMAIL PROTECTED] mailing list. I'm just verifying before rteporting it, if necessary magic words: sql,database,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
RE: Re: Indexes on UPDATE/DELETE
Also, how do I reset an auto-increment value back to 1 (with all rows being already deleted of course). The following deletes all records and re-starts renumbering from 1; DELETE FROM mytable; The following deletes all records and continues counting from where the table last left off: DELETE FROM mytable WHERE 1; -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 09, 2002 4:50 PM To: [EMAIL PROTECTED] Subject: Re: Re: Indexes on UPDATE/DELETE sql,query At 15:35 -0700 2/9/02, Andrei Cojocaru wrote: Also, how do I reset an auto-increment value back to 1 (with all rows being already deleted of course). ALTER TABLE tbl_name AUTO_INCREMENT = 1; Thanks for your help in advance. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Is The MySQL Mailing List On Crack?
I'm not certain about the list. I mailed several message on Tuesday about 3 PM central time. They did not appear until 4:30 AM Wednesday. Many of my messages were duplicated because I did not see them in the list when I mailed them so I was uncertain whether I had even mailed them. Today, I sent a message to the list; it has yet to appear. I'm sending this to you and list to see if it gets to either. rick -Original Message- From: Jeremy Zawodny [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 7:15 PM To: [EMAIL PROTECTED] Subject: Is The MySQL Mailing List On Crack? I'm getting duplicate messages separated by several hours. Am I alone in this, or are others seeing it too? Jeremy -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.47-max: up 5 days, processed 189,890,555 queries (402/sec. avg) - 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: Is The MySQL Mailing List On Crack?
I posted a message at 7:22 AM (US Central). It just appeared at 11:15 AM (US Central) -- -Original Message- From: Jeremy Zawodny [mailto:[EMAIL PROTECTED]] Sent: 13 February 2002 01:15 To: [EMAIL PROTECTED] Subject: Is The MySQL Mailing List On Crack? I'm getting duplicate messages separated by several hours. Am I alone in this, or are others seeing it too? Jeremy -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.47-max: up 5 days, processed 189,890,555 queries (402/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: [SQL] How to delete multiple instances
If you're using mysql 4.0, you might try: DELETE addrbkb FROM addrbkA,addrbkB WHERE addrbkA.phone=addrbkB.phone; This functionality was added with 4.x. I haven't tested this, so BEWARE The following is from the 4.0 manual: DELETE t1,t2 FROM t1,t2,t3 WHERE t1.id=t2.id AND t2.id=t3.id In the above case we delete matching rows just from tables t1 and t2. -Original Message- From: Juergen Schreck [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 8:06 AM To: MYSQL List Subject: [SQL] How to delete multiple instances Hi, I'm wondering what the best way is to remove multiple records matching against multiple instances found in another table. I'd like to avoid using a scripting solution doing this in a loop. Let's say I have two address books and there is some cross-over in entries. I want to delete from addressbook 'A' all records that have a phone number found in addressbook 'B'. In looking through the mysql docs, I realize that mysql doesn't [seem to] support the IN() operater and also doesn't allow sub-queries? I've worked in primebase before and there I would have done this: DELETE FROM addrbkA WHERE phone IN (SELECT phone from addrbkB) Is there any SQL solution to this in mySQL? Using temp tables or external files and/or multiple queries would be ok with me? Thanks much in advance. Regards, Juergen - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Table join question
show us your table structure show us your table values -Original Message- From: Barry J. Wiegan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 11:00 AM To: [EMAIL PROTECTED] Subject: Table join question Hi, I'm trying to build a query to solve a fairly simple problem. I have two tables (A and B) linked by a common ID. I want to locate a specific record in A that is linked to two or more records in B based on second field in B matching certain criteria. I've tried every type of inner, outer, left, and right join to accomplish this, but can't come up with anything that works. EG: Select * from A inner join B on A.ID=B.ID where B.Val='25' and B.Val='35'; This will rturn zero matching records since B.Val can't equal 25 and 35 at the same time. If I substitute and with or, I will get multiple records from A that are linked to either 25 or 25. I just want the one record that is linked to both 25 AND 35. Thanks for any help. Barry Wiegan Senior Software Engineer The Scout Project http://www.scout.cs.wisc.edu/ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Exclusion Query help
If I understood you correctly you are comparing Record_ID to Phase_ID try this: SELECT rx.* FROM records rr LEFT JOIN records rx ON rr.Record_ID=rx.Phase_ID WHERE rr.Record_Date@date1 rr.Record_Date@date2 NOT (rx.Record_Date@date3 rx.Record@date4); This assumes that @date1, @date2, @date3, @date4 contain your date values For my tests, I used: @date1:=2001-01-13; @date2:=2001-01-15; @date3:=2000-12-31; @date4:=2001-01-02; -Original Message- From: John Rosendahl [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 12:53 PM To: [EMAIL PROTECTED] Subject: Exclusion Query help I am trying to run a query I have a table Records |Record_ID| |Phase_ID | |Record_Date| I need to find the records that have a record date between date1 and date 2 but exclude the records with a matching Phase_ID that opccured between date3 and date 4 so if I had the following table Record_IDPhase_IDRecord_Date 1 11/01/01 2314/01/01 3114/01/01 I would want want the query to return only Record number 2 (Given that 1/01/01 is between date 3 4 and 14/01/01 is between date 1 2) Does anyone know how to do this? mySQL, SQL - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Exclusion Query help
If I understood you correctly you are comparing Record_ID to Phase_ID try this: SELECT rx.* FROM records rr LEFT JOIN records rx ON rr.Record_ID=rx.Phase_ID WHERE rr.Record_Date@date1 rr.Record_Date@date2 NOT (rx.Record_Date@date3 rx.Record@date4); This assumes that @date1, @date2, @date3, @date4 contain your date values For my tests, I used: @date1:=2001-01-13; @date2:=2001-01-15; @date3:=2000-12-31; @date4:=2001-01-02; -Original Message- From: John Rosendahl [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 12:53 PM To: [EMAIL PROTECTED] Subject: Exclusion Query help I am trying to run a query I have a table Records |Record_ID| |Phase_ID | |Record_Date| I need to find the records that have a record date between date1 and date 2 but exclude the records with a matching Phase_ID that opccured between date3 and date 4 so if I had the following table Record_IDPhase_IDRecord_Date 1 11/01/01 2314/01/01 3114/01/01 I would want want the query to return only Record number 2 (Given that 1/01/01 is between date 3 4 and 14/01/01 is between date 1 2) Does anyone know how to do this? mySQL, SQL - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Exclusion Query help
If I understood you correctly you are comparing Record_ID to Phase_ID try this: SELECT rx.* FROM records rr LEFT JOIN records rx ON rr.Record_ID=rx.Phase_ID WHERE rr.Record_Date@date1 rr.Record_Date@date2 NOT (rx.Record_Date@date3 rx.Record@date4); This assumes that @date1, @date2, @date3, @date4 contain your date values For my tests, I used: @date1:=2001-01-13; @date2:=2001-01-15; @date3:=2000-12-31; @date4:=2001-01-02; -Original Message- From: John Rosendahl [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 12:53 PM To: [EMAIL PROTECTED] Subject: Exclusion Query help I am trying to run a query I have a table Records |Record_ID| |Phase_ID | |Record_Date| I need to find the records that have a record date between date1 and date 2 but exclude the records with a matching Phase_ID that opccured between date3 and date 4 so if I had the following table Record_IDPhase_IDRecord_Date 1 11/01/01 2314/01/01 3114/01/01 I would want want the query to return only Record number 2 (Given that 1/01/01 is between date 3 4 and 14/01/01 is between date 1 2) Does anyone know how to do this? mySQL, SQL - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Exclusion Query help
I'm trying to figure out the bloody hell you're looking for. What is date3? Where does it come from? I think I speak for most folks here when I say... What is date4? Where does it come from? What is date4? Where does it come from? Why is record 2 good, but not record 3? How does Phase enter into the selection of record 2? -Original Message- From: John Rosendahl [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 12:53 PM To: [EMAIL PROTECTED] Subject: Exclusion Query help I am trying to run a query I have a table Records |Record_ID| |Phase_ID | |Record_Date| I need to find the records that have a record date between date1 and date 2 but exclude the records with a matching Phase_ID that opccured between date3 and date 4 so if I had the following table Record_IDPhase_IDRecord_Date 1 11/01/01 2314/01/01 3114/01/01 I would want want the query to return only Record number 2 (Given that 1/01/01 is between date 3 4 and 14/01/01 is between date 1 2) Does anyone know how to do this? mySQL, SQL - 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: PHP does not see Table updates
Show us your code. What are your table structures like? -Original Message- From: AOK Lansing [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 12:37 PM To: [EMAIL PROTECTED] Subject: PHP does not see Table updates I am using PHP to access a MySQL DB. If I stop MySql and then restart it and then open my webpage the table values are correct. If I make a change to the table, close my browser and restart it, the table values are the old values. If I stop MySQL after changes and then restart it, all works well. What am I doing wrong? Thanks, Bob Hiller - 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: Reset auto_increment
The following deletes all records and re-starts renumbering from 1; DELETE FROM mytable; The following deletes all records and continues counting from where the table last left off: DELETE FROM mytable WHERE 1; If you are trying to restart numbering while not deleting records, forget-about-it. -Original Message- From: Wei Gao [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 2:10 PM To: [EMAIL PROTECTED] Subject: Reset auto_increment Hi, As I am new to MySQL, perhaps this is a common question you have been asked. I have a field Id which using auto_increment. Now I want to reset the value of auto_increment, that is the Id starts form 1 and does not skip the number. I have spent a few hours to find a way, but all failed. Could you please tell me how to do it? Wei _ Join the world's 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 [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: Help, Root User Password Lost!
There is no reason to add comments like There's no successful career path for a hand-held dba. People come to this list looking for help. Comments such as this will cause some folks not to ask questions for fear of public ridicule. Simply answer the question and move on. If you feel a need to make a smart-ass remark, then do so, then use your backspace key to remove it. -Original Message- From: Van [mailto:[EMAIL PROTECTED]] Sent: Monday, February 04, 2002 12:02 AM To: MySQL Subject: Re: Help, Root User Password Lost! zhu cathy wrote: Hello Friends: message removed .. - Cathy: Please, refer to the manual. There's no successful career path for a hand-held dba. This is basic: http://www.mysql.com/doc/A/c/Access_denied.html Van -- = Linux rocks!!! http://www.dedserius.com/ = - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - 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
LIKE Help Please
Steen, I'm sorry I don't know the answer that question. I'll post it and see if you get an answer. P.S. I just noticed that my previous response to you was posted at 8:12 PM, although I emailed it about 4:15 PM -Original Message- From: Steen Rabol [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 5:32 PM To: Rick Emery Subject: Re: Is this possible in one SQL statement if you do this select * from table where field like '%æ%'; you get records which contains both ascii 228 (ä) and ascii 230 (æ) Do I have to set something special in my configuration of MySQL (3.23.44-nt) ? Thanks in advance Steen - 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: Next auto_increment value?
?php $recno = 7; $query = DELETE FROM mytable WHERE field=$recno; mysql_query($query) or die(Error: .mysql_error()); $query = SELECT * FROM mytable WHERE field$recno LIMIT 1; $result = mysql_query($query) or die(Error: .mysql_error()); ? -Original Message- From: Zak Grant [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 6:08 AM To: [EMAIL PROTECTED] Subject: Next auto_increment value? All, I'm a little (lot!) stuck on generating what seems to be quite a simple query... Example: I have a table with ID as auto_increment It contains values 1 to 10 I delete #7 How can I, using MySQL, say I have the number 6 - what's the next valid ID up/down from this? I'm looking for, quite simply, 8 as a response. If I delete #8, I'd get 9, etc. Is this possible? Thanks in advance! And I hope MySQL will be coming back to the PHP International Conference this year :) ~ZG~ PS: Please excuse my English _ Join the world's 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 [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: what type of key is this?
It's created when that field is the first field in a multi-field index. For example: mysql describe mytable; +---+-+--+-+-+---+ | Field | Type| Null | Key | Default | Extra | +---+-+--+-+-+---+ | id| int(11) | YES | | NULL| | | val | char(5) | YES | | NULL| | +---+-+--+-+-+---+ 2 rows in set (0.38 sec) mysql alter table mytable add index qq(id,val); mysql describe mytable; +---+-+--+-+-+---+ | Field | Type| Null | Key | Default | Extra | +---+-+--+-+-+---+ | id| int(11) | YES | MUL | NULL| | | val | char(5) | YES | | NULL| | +---+-+--+-+-+---+ 2 rows in set (0.00 sec) -Original Message- From: Shon Stephens [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 10:24 AM To: [EMAIL PROTECTED] Subject: what type of key is this? i have been asked to create an sql table with a certain structure. i was sent a description of the table. the first column is desribed as having a MUL key. i don't now what that is or how to create it. can someone please help. thanks, shon - 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: Please clarify the doubt
MYSQL does not support STORED PROCEDURE, TRIGGERS or VIEWS. maybe, someday... -Original Message- From: Narendra [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 12:34 AM To: mysql Subject: Please clarify the doubt Hi, i am developing a software on linux platform and Mysql Ver 11.13 Distrib 3.23.36, for redhat-linux-gnu (i386) as the backend and i would like to know if MySQL( any version like previous one or the latest version), either of versions supports STORED PROCEDURE, TRIGGERS and also VIEWS? if it supports please give the url's or the materials to get sufficient information regarding this , please consider this to be atmost priority as i am nearing deadline of project completion Thanking You expecting an early reply regards Narendra - 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: Is this possible in one SQL statement
Please restate the following more completely. I think some typos got in there. If not, then we need more detail of what you really want. the condition is then value 1 and 3 and the record I want is A1 and A3 due to the fact that a recorc exists in table B with a value of on and one record with the value of 3 -Original Message- From: Steen Rabol [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 2:25 PM To: [EMAIL PROTECTED] Subject: Is this possible in one SQL statement Is this possible in a single select statement ? table A id (Unique), a_field1,a_field2,a_field3 table B id(NOT unique), b_field1 Id in table B is a ref to id in table A Now i would like to select all the id's from table A which have records i table B where b_field1 is 1 and b_field2 is 2 example: Table a record: 1, text,text,text - A1 Table a record: 2, text,text,text - A2 Table a record: 3, text,text,text - A3 Table b record 1, 1 Table b record 2, 2 Table b record 1, 3 Table b record 2, 1 Table b record 1, 4 Table b record 3, 1 Table b record 3, 3 the condition is then value 1 and 3 and the record I want is A1 and A3 due to the fact that a recorc exists in table B with a value of on and one record with the value of 3 Is it clean ;-)) I know that it can be done with a nested loops, but is it possible in one statement sql query ? Thanks in advance Steen - 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: Plz help w/ query
Do away with that wretched MYSQL_ASSOC. I've seen it cause much pain and misery. It is not needed. while ($row_1=mysql_fetch_array($result_1)) -Original Message- From: Anthony Rodriguez [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 7:32 AM To: [EMAIL PROTECTED] Subject: Plz help w/ query The following query displays 0 e-mails. Why? Tbl con_inf holds 51 records w/ 51 usernames. Tbl scr_149 holds 37 records with 37 equivalent usernames of which 14 show date_done=0. ?php $connection=mysql_connect(localhost,wagner,xxx) or die (No connection!); $db=mysql_select_db(sbwresearch,$connection) or die (No database!); $qry_1=select con_inf.e_mail from con_inf, scr_149 where scr_149.date_done=\0\ AND con_inf.username=scr_149.username; $result_1=mysql_query($qry_1,$connection) or die (No query # 1!); while ($row_1=mysql_fetch_array($result_1, MYSQL_ASSOC)) { $e_mail=$row_1[e_mail]; echo $e_mail\n; }; mysql_free_result($result_1); mysql_close($connection); exit; ? Thanks! Anthony F. Rodriguez ([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
RE: Is this possible in one SQL statement
mysql select distinct a.* from tableA a left join tableB b1 using(id), tableB b2 where a.id=b1.id b1.id=1 b2.id=3; -Original Message- From: Steen Rabol [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 2:51 PM To: Rick Emery; [EMAIL PROTECTED] Subject: Re: Is this possible in one SQL statement I want to select all the records in table A which have record in Table B where field1 is equal to 3 and have a record in Table B where field1 is equal to 1, in other word two records (or more) must exist in Table B in order to give me a record from Table A like this select * from table_a, tabele_b.field1 where table_a.id = table_b.id and (table_b.filed1 = 1 AND able_b.filed1 = 3) This is the 'problem' as I perfectly know that a field only can contain one value Hope this is more clear. Best Steen - Original Message - From: Rick Emery [EMAIL PROTECTED] To: 'Steen Rabol' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, January 31, 2002 9:35 PM Subject: RE: Is this possible in one SQL statement Please restate the following more completely. I think some typos got in there. If not, then we need more detail of what you really want. the condition is then value 1 and 3 and the record I want is A1 and A3 due to the fact that a recorc exists in table B with a value of on and one record with the value of 3 -Original Message- From: Steen Rabol [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 2:25 PM To: [EMAIL PROTECTED] Subject: Is this possible in one SQL statement Is this possible in a single select statement ? table A id (Unique), a_field1,a_field2,a_field3 table B id(NOT unique), b_field1 Id in table B is a ref to id in table A Now i would like to select all the id's from table A which have records i table B where b_field1 is 1 and b_field2 is 2 example: Table a record: 1, text,text,text - A1 Table a record: 2, text,text,text - A2 Table a record: 3, text,text,text - A3 Table b record 1, 1 Table b record 2, 2 Table b record 1, 3 Table b record 2, 1 Table b record 1, 4 Table b record 3, 1 Table b record 3, 3 the condition is then value 1 and 3 and the record I want is A1 and A3 due to the fact that a recorc exists in table B with a value of on and one record with the value of 3 Is it clean ;-)) I know that it can be done with a nested loops, but is it possible in one statement sql query ? Thanks in advance Steen - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Size Limitations
The Linux version no longer has 2 GB limit. It is now whatever your disk capacity is. -Original Message- From: Steve Kramer [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 11:34 AM To: Christopher Thompson Cc: MySQL Subject: RE: Size Limitations The manual doesn't specify the Windows limit - only the Linux value of 2 gb. -Original Message- From: Christopher Thompson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 9:57 AM To: Hashim Ismail; [EMAIL PROTECTED] Subject: Re: Size Limitations At 09:49 AM 1/30/2002 -0500, Hashim Ismail wrote: Is there a database size limitation with MySQl in the Windows NT and Windows 2000 enviroment? Like some databases have size limitation of 2GB. Yes. Read the manual. In a Windows environment, table sizes are limited to 2 gigabytes if memory serves, it is all in the manual, though. You can, of course, have more than one table in your database. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: SQL help plz
mysql describe mytable; +---+--+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +---+--+--+-+-+---+ | id| int(11) | YES | | NULL| | | keyq | int(11) | YES | | NULL| | | name | char(20) | YES | | NULL| | | dateq | date | YES | | NULL| | +---+--+--+-+-+---+ 4 rows in set (0.00 sec) select name,max(dateq) from mytable group by name; -Original Message- From: P.Agenbag [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 1:36 PM To: mysql Subject: SQL help plz Hi I need help with an sql string: have a table similar to this: idkeynamedate 1 123name1 date1 2 123name1 date2 3 111name2 date1 4 111name2 date2 5 123name1 date3 Now, I need sql to report the following result: name1 date3 name2 date2 thus, report all the names in the table but only the ones with the latest date. The sql MUST use the key to compare the different rows with each other and NOT the name, as the name is prone to spelling errors (ok, the key as well, but it's easier to make a typo with letters than with digits and I already have a couple of entries where the names of the entries are different. - 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: SQL help plz
Sorry, I meant: mysql select name,max(dateq) from mytable group by keyq; -Original Message- From: Rick Emery Sent: Wednesday, January 30, 2002 2:14 PM To: 'P.Agenbag'; mysql Subject: RE: SQL help plz mysql describe mytable; +---+--+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +---+--+--+-+-+---+ | id| int(11) | YES | | NULL| | | keyq | int(11) | YES | | NULL| | | name | char(20) | YES | | NULL| | | dateq | date | YES | | NULL| | +---+--+--+-+-+---+ 4 rows in set (0.00 sec) select name,max(dateq) from mytable group by name; -Original Message- From: P.Agenbag [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 1:36 PM To: mysql Subject: SQL help plz Hi I need help with an sql string: have a table similar to this: idkeynamedate 1 123name1 date1 2 123name1 date2 3 111name2 date1 4 111name2 date2 5 123name1 date3 Now, I need sql to report the following result: name1 date3 name2 date2 thus, report all the names in the table but only the ones with the latest date. The sql MUST use the key to compare the different rows with each other and NOT the name, as the name is prone to spelling errors (ok, the key as well, but it's easier to make a typo with letters than with digits and I already have a couple of entries where the names of the entries are different. - 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: SQL help plz
Further, I'd advise NOT using field names like date and key. Using eserved words is never a good prcatice. -Original Message- From: Rick Emery Sent: Wednesday, January 30, 2002 2:16 PM To: 'P.Agenbag'; 'mysql' Subject: RE: SQL help plz Sorry, I meant: mysql select name,max(dateq) from mytable group by keyq; -Original Message- From: Rick Emery Sent: Wednesday, January 30, 2002 2:14 PM To: 'P.Agenbag'; mysql Subject: RE: SQL help plz mysql describe mytable; +---+--+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +---+--+--+-+-+---+ | id| int(11) | YES | | NULL| | | keyq | int(11) | YES | | NULL| | | name | char(20) | YES | | NULL| | | dateq | date | YES | | NULL| | +---+--+--+-+-+---+ 4 rows in set (0.00 sec) select name,max(dateq) from mytable group by name; -Original Message- From: P.Agenbag [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 1:36 PM To: mysql Subject: SQL help plz Hi I need help with an sql string: have a table similar to this: idkeynamedate 1 123name1 date1 2 123name1 date2 3 111name2 date1 4 111name2 date2 5 123name1 date3 Now, I need sql to report the following result: name1 date3 name2 date2 thus, report all the names in the table but only the ones with the latest date. The sql MUST use the key to compare the different rows with each other and NOT the name, as the name is prone to spelling errors (ok, the key as well, but it's easier to make a typo with letters than with digits and I already have a couple of entries where the names of the entries are different. - 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: [NEWBIE]Can't run mysql client
mysql must be in your PATH. Is it? -Original Message- From: Egor Egorov [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 8:30 AM To: [EMAIL PROTECTED] Subject: [NEWBIE]Can't run mysql client Stephane, Monday, January 28, 2002, 1:29:40 PM, you wrote: SP I've installed mysql 3.23.47 (Binaries) on a Linux RedHat 7.0 box. SP Everything seems to be OK (the server runs) but I cannot connect to it using SP mysql client: SP When I enter mysql -u etc... SP I've got a bash: mysql: command not found SP Any idea ? Are you sure you have installed ALL packages that MySQL consist of ? Please be sure that MySQL-client package is installed. SP Thanks -- 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 - 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: foreign key?
select Item.Item_Description, Item.Retail_Value, Item.Bid_Description, Contributors.Name from Item, Contributors where Contributors.Contributor_ID 1; -Original Message- From: David S. Jackson [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 12:14 PM To: Gurhan Ozen; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: foreign key? On Fri, Jan 25, 2002 at 12:33:59PM -0500 Gurhan Ozen [EMAIL PROTECTED] wrote: Hi David, First of all, whever you have a primary key on your table, do all updates according to the primary key.. So whatever the primary key for the person you wanna do update, do something like: update Contributors set Contact_ID = 1, Volunteer_ID = 13 where Contributor_ID=number; Also since the columns are integer data type, don't use quotes around them. I hope this helps.. Yep, I removed the quotes, and it worked. Here's another problem: I think I'm doing an unintentional ambiguous select: mysql select Item.Item_Description, Item.Retail_Value, Item.Bid_Description, Contributors.Name from Item, Contributors where Contributor_ID 1; I get the error: ERROR 1052: Column: 'Contributor_ID' in where clause is ambiguous So, looking again at my definitions for Contributor_ID in both tables, I see they aren't exactly alike. Is there a way I can make Contributor_ID in Item refer back to the Index (Contributor_ID) in Contributors? I gather that just making the data types the same is not enough? TIA! -- David S. Jackson[EMAIL PROTECTED] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= I'm going to live forever, or die trying! -- Spider Robinson - 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
Column Alias Bug??
Is this a bug? I can't find an answer to this question in FAQs or archives. CREATE TABLE aa ( a int); INSERT INTO aa VALUES (1),(2),(3),(2),(4),(5),(1),(6),(3); the following : mysql select a,count(*) as z from aa where z1 group by a; displays this error: ERROR 1054: Unknown column 'z' in 'where clause' Why isn't z recognized as a column identifier? - 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: Column Alias Bug??
count(*) works if I do not alias it with z, and do not use WHERE clause: mysql select a,count(*) from aa group by a; +--+--+ | a| count(*) | +--+--+ |1 |2 | |2 |2 | |3 |2 | |4 |1 | |5 |1 | |6 |1 | +--+--+ 6 rows in set (0.40 sec) -Original Message- From: Nathan [mailto:[EMAIL PROTECTED]] Sent: Friday, January 18, 2002 3:34 PM To: Rick Emery Subject: Re: Column Alias Bug?? What does the count(*) do? If that's failing, maybe the alias doesn't get created? Shot in the dark obviously... :-) # Nathan - Original Message - From: Rick Emery [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 18, 2002 2:30 PM Subject: Column Alias Bug?? Is this a bug? I can't find an answer to this question in FAQs or archives. CREATE TABLE aa ( a int); INSERT INTO aa VALUES (1),(2),(3),(2),(4),(5),(1),(6),(3); the following : mysql select a,count(*) as z from aa where z1 group by a; displays this error: ERROR 1054: Unknown column 'z' in 'where clause' Why isn't z recognized as a column identifier? - 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: auto_increment
To answer your second question about how to retrieve the auto_incremented values: $dbh-do(SELECT last_insert_id() AS myvalue); execute the above IMMEDIATELY after inserting the record -Original Message- From: Ben Curran [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 15, 2002 5:59 PM To: [EMAIL PROTECTED] Subject: auto_increment Sorry if this is a newbie question, I've been through the manual, still can't figure it out. If one has created a table, with a key using auto_increment, how does one Insert data into it? If my table consists of (inID (primary key, auto incremented), employeeID (foreign key) time, date). if I use $dbh-do(INSERT INTO timein VALUES('$employeeID','$timein','$day')); obviously, it tells me that DBD::mysql::db do failed: Column count doesn't match value count. How do I refer to the auto incremented field when attempting to place values in a new row? my only thought is that it has something to do with mysql_insert_id. not sure how though. thanks. ben. This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system, do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this. - 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: MySQL newbie question
did you start mysqld ? -Original Message- From: David Burklin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 16, 2002 1:36 PM To: '[EMAIL PROTECTED]' Subject: MySQL newbie question Hello, and sorry for the bother with what is probaby a very simple problem. I'm new to MySQL. I have just installed RedHat 7.2 Linux, and installed the included distribution of MySQL, which is version 3.23.41 When I try to run the mysql program, either by itself, or with any arguments, I get the following error. ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Could anyone provide advice as to what I need to do to get this running? Thanks for any assistance you can provide. - 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: ROW ID
If the value was set with AUTO_INCREMENT, then immediately after inserting the row, do: SELECT last_insert_id() AS myvalue; -Original Message- From: Ing. Gustavo Edelstein [mailto:[EMAIL PROTECTED]] Sent: Monday, January 14, 2002 10:03 AM To: [EMAIL PROTECTED] Subject: ROW ID Hi list members, How to get the unique row id for a row in a table ? Thanks. Ing. Gustavo A. Edelstein Tech. Mgr. Equiplus Argentina S.A. __ Visit us On Line at www.equiplus.com Email addresses: Operations: [EMAIL PROTECTED] Consulting: [EMAIL PROTECTED] Technical: [EMAIL PROTECTED] Web related: [EMAIL PROTECTED] General: [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
RE: [PHP-DB] any good web hosting with php and mysql support?
I use http://www.nomonthly fees.com Initial buy-in is $200. However, that includes domain name registration, 500 megs of disks pace, 5 giga-bytes of band-width per month. Complete PHP and MYSQL support. Bunch of other stuff too, like 1000 POP3 email boxes, PGP, shopping carts, etc. After first year, it's $70 per year ( $6/month) -Original Message- From: Gurhan Ozen [mailto:[EMAIL PROTECTED]] Sent: Monday, January 14, 2002 12:18 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: [PHP-DB] any good web hosting with php and mysql support? Hi All, I am currently looking for a reliable web host to host my personal website. I know there are millions of web hosting companies that have PHP and MYSQL support but I just can't trust any of the fully-assured and confident webhosting ads anymore. I would like to get a service from a company for which someone can vouch. I did started hosting my web site at a webhoster that promised 99.99% uptime and my site is hardly ever up and running. They don't answer my emails either. IS there anyone who have web sites hosted at webhosting service for a reasonably long time without any problems? IF yes, can you please contact me and tell me about it? This might be kind of off-topic for both lists, and i apologize to both lists, so you might want to reply to my email rather than sending it to list(s). Thank you very much. Gurhan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, 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
RE: [PHP-DB] any good web hosting with php and mysql support?
In my previous email, I mentioned that http://www.nomonthlyfees.com provided 500 megs of disk space per account. I host several a domains by redirecting domains (5) to sub-directories within that 500. I don't have a 500-meg account for each domain. After the first year, the 500-megs cost $70/year. rick Richard Emery IT Sr. Project Manager (972) 478-3398 -- Original Message -- From: Gurhan Ozen [EMAIL PROTECTED] Date: Mon, 14 Jan 2002 13:17:59 -0500 Hi All, I am currently looking for a reliable web host to host my personal website. I know there are millions of web hosting companies that have PHP and MYSQL support but I just can't trust any of the fully-assured and confident webhosting ads anymore. I would like to get a service from a company for which someone can vouch. I did started hosting my web site at a webhoster that promised 99.99% uptime and my site is hardly ever up and running. They don't answer my emails either. IS there anyone who have web sites hosted at webhosting service for a reasonably long time without any problems? IF yes, can you please contact me and tell me about it? This might be kind of off-topic for both lists, and i apologize to both lists, so you might want to reply to my email rather than sending it to list(s). Thank you very much. Gurhan - 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: Problems with search
Perhaps, add the DISTINCT modifier: SELECT distinct * FROM tutoriais,scripts WHERE tutoriais.nome LIKE '%mysql%' OR tutoriais.descricao LIKE '%mysql%' AND scripts.nome LIKE '%mysql' -Original Message- From: Davis Zanetti Cabral [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 31, 2001 2:39 PM To: [EMAIL PROTECTED] Subject: Problems with search I have problems with searches where I try search in 2 or more tables with a query only. But the data came more that one time. I dont speak english very well... if somebody understand portuguese, please reply for me... sql = SELECT * FROM tutoriais,scripts WHERE tutoriais.nome LIKE '%mysql%' OR tutoriais.descricao LIKE '%mysql%' AND scripts.nome LIKE '%mysql' whats prob here? tanks... O meu problema eh pesquisas em 2 tabelas ao mesmo tempo... os dados se repetem... SELECT * FROM tutoriais,scripts WHERE tutoriais.nome LIKE '%mysql%' OR tutoriais.descricao LIKE '%mysql%' AND scripts.nome LIKE '%mysql' qual o problema nisso? obrigado Davis [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
RE: SQL/Design -- how to use sub entities/type discriminators ?
You don't really have to do the two searches and if-then-else. You can use joins to first get all grads, then a join to get all profs. SELECT user.*,graduser.* FROM graduser LEFT JOIN user USING(userid); SELECT user.*,profuser.* FROM profuser LEFT JOIN user USING(userid); These assume USERIDs are unique among grads and profs -Original Message- From: j.random.programmer [mailto:[EMAIL PROTECTED]] Sent: Monday, January 14, 2002 2:56 PM To: [EMAIL PROTECTED] Subject: SQL/Design -- how to use sub entities/type discriminators ? Hi all: Consider a hierarchy of users. All users have certain properties (they all have a name and date-of-birth). Additionally, based on their type, users have more properties. So a graduate user may have information regarding the year and school of graduation, a professor user may have information about the classes they teach etc. A intuitive way (for me at least) to model this is to create a table per type and add a special type discriminator field that points to the next special table for that type. So, I have a User table that holds information common to all users and then specialized tables such as GradUser, UndergradUser etc., that hold additional specific information about that particular kind of user. Table User has columns: --userid --name --birthdate --usertype Table GradUser has columns: --userid --school Table ProfessorUser has columns: --userid --classes and Table UserType has 2 entries: usertypetable description 1 GradUser type for grad 2 ProfUser type for prof's Taking a concrete example, say one user-record (shown vertically) looks like: Table: User Column Value userid 123 nameMolly Millions usertype1 Table: GradUser id 123 school Hard-Knocks So based on the usertype ('1' in the above example), I have to get the remaining information for Molly from GradUser. If the usertype had been '2', I would then have had to get the remaining information from the ProfUser table instead. Note, I can't do a simply join between User and GradUser (using 123), because I don't know the name of the table (GradUser or ProfUser) until I have read the usertype field in the User table. So what I really need to do is: -Read a record from User -Read it's corresponding type. -Based on the type, choose another table and read additional information. MySQL does not have sub-queries but does allow me to select into temporary tables easily. What's the most efficient SQL to read a given user's entire information (common + specific information) ? I want to minimize traffic between my client and the server so I would ideally speaking, like to do this all on the database side itself. Essentially I need a if .. then type of logic on the *server*. So in psuedo-code: if (usertype = '1') then join user and graduser else if (usertype = '2') then join user and profuser etc.. Best regards, [EMAIL PROTECTED] __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - 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