Re: whats the best way to imput text and formated text into a mysql database
Hi, If you are inputting text, perhaps you should create a simple HTML form and use PHP to insert into the database for you. You can use the PHP internal function add_slashes($text) to automatically delimit everything for you. If you don't know what PHP is or don't have it installed, then perhaps using Perl DBI to do a similar thing? If you are really stuck, but know you can ask an administrator to install PHP for you, then come back to me and ask how to program it in PHP. Also, it's entirely up to you if you want to thank someone for their help... Of couse, it would be nice if you did. ;) Regards, Kevin - Original Message - From: ahimsa [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 08, 2003 9:21 PM Subject: whats the best way to imput text and formated text into a mysql database Thank you so much everyone for all of your support! I asked a question re: a mysql post error when the text containd apostrophe and commas. I got feedback re: delimiting and putting a / before each comma and appostrophy. The problem is that this is not feasable for me to do this on so much text, besides its messy etc. does anyone have any suggestions on the best way to imput text into a mysql database that is simple that will accept what ever text, It would be great if it could be formated text. But is this possible. Maybe i should be using a blob field instead of a text field or somethign. Im not sure. Im using mysql with php in my forms. i maybe need to do all of this differently. My goal is to imput pages and pages of text into text fields. Thank you all so much. Also Is it ok to write a thank you to people when they reply or is it standard etiquette to not reply ? Thanks again so much. leeann - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 it my English or does this sound bad?
I guess it depends on if you have a dirty mind, or, you just ignore it and understand the point of the example. ;) lol But yeah, could have been worded slightly different. Kevin - Original Message - From: Defryn, Guy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 05, 2003 2:58 AM Subject: Is it my English or does this sound bad? I was just reading through the Mysql manual section 3.32 And came across a sentence that started like this Animal sex can be represented in a variety of ways My mother tongue is not English but doesn't it sound rude ? :-) mysql CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20), - species VARCHAR(20), sex CHAR(1), birth DATE, death DATE); VARCHAR is a good choice for the name, owner, and species columns because the column values will vary in length. The lengths of those columns need not all be the same, and need not be 20. You can pick any length from 1 to 255, whatever seems most reasonable to you. (If you make a poor choice and it turns out later that you need a longer field, MySQL provides an ALTER TABLE statement.) Animal sex can be represented in a variety of ways, for example, m and f, or perhaps male and female. It's simplest to use the single characters m and f. Query/mysql - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Deleting a database in Mysql
drop database yourdatabasename; - Original Message - From: Calvin Lam [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 05, 2003 2:50 PM Subject: Deleting a database in Mysql Hi, I am a newbie with this and I need help with Mysql How can I delete a database 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: encrypted password
Hi, Simply do the following: INSERT INTO yourtable (username, password) VALUES ('chichi', PASSWORD('jian1830')); The encrypted password will look like this... 2748c558120ee3c9. This is MySQL's own internal encrypting function. Remember to set the password to a, CHAR(16) binary not null, field. Or, you could use MD5 to encrypt it as well. Just remember that you will need to program your server side language to encrypt the password before checking against the database you probably know that already, just thought I'd state the obvious (must be a British thing). ;) Regards, Kevin - Original Message - From: Jianping Zhu [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 04, 2003 7:58 PM Subject: encrypted password I have mysql in a redhat machine. I need to use mysql do user authentication to a website. I have a table like following. +--+--+ | username | passwd | +--+--+ | jianping | jian1830 | | chichi | jian1830 | +--+--+ I want the passwd field not to be plain text but encrypted. how can i do that? 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: date issue
Well, this query works, so it must be doable SELECT DATE_FORMAT(NOW(),'%M') AS TheMonth, IF(DATE_FORMAT(NOW(),'%M')='February','Yep','Nope') AS IFCheck FROM pickAnyTableAsLongAsItExists WHERE DATE_FORMAT(NOW(),'%M') = 'February' LIMIT 1; And provided the month is indeed February. ;) Not sure if you can do a range of months, though you could use the IN clause with the WHERE clause. - Original Message - From: Stefan Hinz, iConnect (Berlin) [EMAIL PROTECTED] To: Daniel Rossi [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, February 03, 2003 12:58 PM Subject: Re: date issue Daniel, (you posted this question twice, but I will only answer it once ;-) have a month string January from a get query string like so ?month=January , and i need to check a range of results within an endate so i need WHERE end_date $_GET['month'] , You could use the DATE_FORMAT() function of MySQL for this: mysql SELECT DATE_FORMAT(NOW(),'%M'); +-+ | DATE_FORMAT(NOW(),'%M') | +-+ | February| +-+ You can't compare this with something like 'January', though, because 'January' is a string while the above result is a date. If your query string has 'month=January', this is a design problem, and you will have to use a bit of array magic to convert your string into a date for comparison. Someone slap me if there is an easy way _in MySQL_ to accomplish this. Regards, -- Stefan Hinz [EMAIL PROTECTED] Geschäftsführer / CEO iConnect GmbH http://iConnect.de Heesestr. 6, 12169 Berlin (Germany) Tel: +49 30 7970948-0 Fax: +49 30 7970948-3 - Original Message - From: Daniel Rossi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 03, 2003 1:41 AM Subject: date issue hi there i am having an issue formatting a date string back to mysql for a query, say i have a month string January from a get query string like so ?month=January , and i need to check a range of results within an endate so i need WHERE end_date $_GET['month'] , how can i format the month string back to mysql so it can understand it , let me know 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 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
zerofill fields
Hi All, I noticed that when you return a zerofill field from a select statement into a server-side language, say PHP or Perl, it will store the number with the zeros included, great no problem. However, if I insert into that table which has a primary key which is set as a zerofill field, when I use the PHP command mysql_insert_id() it returns the primary key value, but without the zeros, is there any way round this apart from writing some code to add the zeros? 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
SQL Syntax (JOINS) Help
Hi All, Can anyone help me get this query working in MySQL, this was created using Access, but it doesn't port well for MySQL syntax: SELECT basket.id, products.part_code, products.product_type, products.description, product_options_1.options, basket.price, basket.quantity, basket.price*basket.quantity AS total FROM (products LEFT JOIN product_options ON products.prod_id=product_options.prod_id) RIGHT JOIN (product_options AS product_options_1 RIGHT JOIN (basket_header INNER JOIN basket ON basket_header.basket_id=basket.basket_id) ON product_options_1.po_id=basket.op_id) ON products.prod_id=basket.prod_id GROUP BY basket.id, products.part_code, products.product_type, products.description, product_options_1.options, basket.price, basket.quantity, basket.price*basket.quantity, basket_header.basket_id, products.options HAVING (((basket_header.basket_id)=4)); Here is the error message MySQL reports: ERROR 1064: You have an error in your SQL syntax near '(product_options AS product_options_1 RIGHT JOIN (basket_header INNER JOIN baske' at line 9 Seems MySQL doesn't like the RIGHT JOIN syntax. Any ideas to the correct syntax? Just give you a better idea, here is a graphical schema of the query from MS Access. http://www.netsmith.ltd.uk/example.gif 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
test mysql
Sorry guys/gals, just a test for the mysql list. 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
MySQL Test
Just a test for the MySQL list. 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
Re: SQL Syntax
Hi Benjamin, Wow, that sure sorted that problem out... I had to rejig it slightly to get it to work, but this is the final working version: SELECT b.id, p.part_code, p.product_type, p.description, po.options, b.price, b.quantity, b.price*b.quantity AS total FROM basket_header bh INNER JOIN basket b ON b.basket_id = bh.basket_id LEFT JOIN products p ON p.prod_id = b.prod_id LEFT JOIN product_options po ON po.po_id = b.op_id WHERE bh.basket_id = 4 GROUP BY b.id, p.part_code, p.product_type, p.description, po.options, b.price, b.quantity, total, bh.basket_id, p.options Many thanks, now I'll work out why I couldn't do that so I can better understand it. Kevin - Original Message - From: Benjamin Pflugmann [EMAIL PROTECTED] To: Kevin Smith [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, February 01, 2003 4:32 AM Subject: Re: SQL Syntax Hi. On Fri 2003-01-31 at 15:46:37 -, [EMAIL PROTECTED] wrote: Hi All, Can anyone help me get this query working in MySQL, this was created using Access, but it doesn't port well for MySQL syntax: SELECT basket.id, products.part_code, products.product_type, products.description, product_options_1.options, basket.price, basket.quantity, basket.price*basket.quantity AS total FROM (products LEFT JOIN product_options ON products.prod_id=product_options.prod_id) RIGHT JOIN (product_options AS product_options_1 RIGHT JOIN (basket_header INNER JOIN basket ON basket_header.basket_id=basket.basket_id) ON product_options_1.po_id=basket.op_id) ON products.prod_id=basket.prod_id GROUP BY basket.id, products.part_code, products.product_type, products.description, product_options_1.options, basket.price, basket.quantity, basket.price*basket.quantity, basket_header.basket_id, products.options HAVING (((basket_header.basket_id)=4)); Reformatting for readability that is: SELECT basket.id, products.part_code, products.product_type, products.description, product_options_1.options, basket.price, basket.quantity, basket.price*basket.quantity AS total FROM ( products LEFT JOIN product_options ON product_options.prod_id = products.prod_id ) RIGHT JOIN ( product_options AS product_options_1 RIGHT JOIN ( basket_header INNER JOIN basket ON basket.basket_id = basket_header.basket_id ) ON product_options_1.po_id = basket.op_id ) ON products.prod_id = basket.prod_id GROUP BY basket.id, products.part_code, products.product_type, products.description, product_options_1.options, basket.price, basket.quantity, total, basket_header.basket_id, products.options HAVING basket_header.basket_id=4; Here is the error message MySQL reports: ERROR 1064: You have an error in your SQL syntax near '(product_options AS product_options_1 RIGHT JOIN (basket_header INNER JOIN baske' at line 9 Seems MySQL doesn't like the RIGHT JOIN syntax. Any ideas to the correct syntax? Oh, RIGHT JOINs are fine. What it doesn't like are the parenthesis, I think. So simply reordering the joins (and by that replacing RIGHT JOINs with LEFT JOINs were appropriate and vice versa) should do the trick. FROM ( ( basket_header INNER JOIN basket ON basket.basket_id = basket_header.basket_id ) LEFT JOIN product_options AS product_options_1 ON product_options_1.po_id = basket.op_id ) LEFT JOIN ( products LEFT JOIN product_options ON product_options.prod_id = products.prod_id ) ON products.prod_id = basket.prod_id Now, a lot of the parenthesis are redundant. Written this way, it becomes more obvious, that product_options (not product_options_1) is neither referenced by a other table in an ON clause nor used in the select part, so what is the reason to include it to begin with? It's redundant. Additionally, I don't see the reason for the HAVING clause. IMHO the condition would be as good in the WHERE clause (where the optimizer can make better use of it). Aside from that, I prefer table aliases to get rid of the long names, so the end result would look like SELECT basket.id, p.part_code, p.product_type, p.description, po1.options, b.price, b.quantity, b.price*b.quantity AS total FROM basket_header bh INNER JOIN basket b ON b.basket_id = bh.basket_id LEFT JOIN products p ON p.prod_id = b.prod_id LEFT JOIN product_options po1 ON po1.po_id = b.op_id HAVING bh.basket_id = 4; GROUP BY b.id, p.part_code, p.product_type, p.description, po1.options, b.price, b.quantity, total, bh.basket_id, p.options (I did not rename po1 to po in order to avoid confusion.) HTH, Benjamin. -- [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
SQL Syntax Help
Hi All, Can anyone help me get this query working in MySQL, this was created using Access, but it doesn't port well for MySQL syntax: SELECT b.id, p.part_code, p.product_type, p.description, po1.options, b.price, b.quantity, b.price*b.quantity AS total FROM (products AS p LEFT JOIN product_options AS po ON p.prod_id = po.prod_id) RIGHT JOIN (product_options AS po1 RIGHT JOIN (basket_header AS bh INNER JOIN basket AS b ON bh.basket_id = b.basket_id) ON po1.po_id = b.op_id) ON p.prod_id = b.prod_id GROUP BY b.id, p.part_code, p.product_type, p.description, po1.options, b.price, b.quantity, b.price*b.quantity, bh.basket_id, p.options HAVING (((bh.basket_id)=4)); Here is the error message MySQL reports: You have an error in your SQL syntax near '(product_options AS po1 RIGHT JOIN (basket_header AS bh INNER JOIN basket AS b O' at line 1 Any ideas to the correct syntax? 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
Re: MySql, PHP and Javascript
Hi Steve, Yes, it is possible to mix PHP and JavaScript, for example: var givemeaphpvalue = ?php echo $phpvalue; ?; I use PHP and Javascript together quite often. Regards, Kevin - Original Message - From: Steve Davies [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 31, 2003 8:27 AM Subject: MySql, PHP and Javascript Hi All Is it possible to mix javascript and PHP in the same script?? I have a number of web based apps written in PHP/MySql and while they are functionally pretty good they are aesthetically garbage. I'll like to pretty up the interfaces with rollovers etc, but haven't got time to learn JS properly especially if I have to completly re-write the functionality. Any help greatly appreciated Steve - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
SQL Syntax
Hi All, Can anyone help me get this query working in MySQL, this was created using Access, but it doesn't port well for MySQL syntax: SELECT basket.id, products.part_code, products.product_type, products.description, product_options_1.options, basket.price, basket.quantity, basket.price*basket.quantity AS total FROM (products LEFT JOIN product_options ON products.prod_id=product_options.prod_id) RIGHT JOIN (product_options AS product_options_1 RIGHT JOIN (basket_header INNER JOIN basket ON basket_header.basket_id=basket.basket_id) ON product_options_1.po_id=basket.op_id) ON products.prod_id=basket.prod_id GROUP BY basket.id, products.part_code, products.product_type, products.description, product_options_1.options, basket.price, basket.quantity, basket.price*basket.quantity, basket_header.basket_id, products.options HAVING (((basket_header.basket_id)=4)); Here is the error message MySQL reports: ERROR 1064: You have an error in your SQL syntax near '(product_options AS product_options_1 RIGHT JOIN (basket_header INNER JOIN baske' at line 9 Seems MySQL doesn't like the RIGHT JOIN syntax. Any ideas to the correct syntax? 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
Re: SQL Syntax
Also, this might help to solve the problem, this is a graphical schema of the query from MS Access, to give you all a better idea of what I'm trying to accomplish... http://www.netsmith.ltd.uk/example.gif - Original Message - From: Kevin Smith [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 31, 2003 3:46 PM Subject: SQL Syntax Hi All, Can anyone help me get this query working in MySQL, this was created using Access, but it doesn't port well for MySQL syntax: SELECT basket.id, products.part_code, products.product_type, products.description, product_options_1.options, basket.price, basket.quantity, basket.price*basket.quantity AS total FROM (products LEFT JOIN product_options ON products.prod_id=product_options.prod_id) RIGHT JOIN (product_options AS product_options_1 RIGHT JOIN (basket_header INNER JOIN basket ON basket_header.basket_id=basket.basket_id) ON product_options_1.po_id=basket.op_id) ON products.prod_id=basket.prod_id GROUP BY basket.id, products.part_code, products.product_type, products.description, product_options_1.options, basket.price, basket.quantity, basket.price*basket.quantity, basket_header.basket_id, products.options HAVING (((basket_header.basket_id)=4)); Here is the error message MySQL reports: ERROR 1064: You have an error in your SQL syntax near '(product_options AS product_options_1 RIGHT JOIN (basket_header INNER JOIN baske' at line 9 Seems MySQL doesn't like the RIGHT JOIN syntax. Any ideas to the correct syntax? 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
MySQL-Front
Hi All, Does anyone know what happened to the MySQL-Front project, which was at http://www.anse.de/mysqlfront/ ? 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
Re: auto_increment setting the start number
mysql... see below, got caught be the filter of this list... - Original Message - From: [EMAIL PROTECTED] To: Kevin Smith [EMAIL PROTECTED] Sent: Sunday, April 14, 2002 3:13 PM Subject: Re: auto_increment setting the start number Your message cannot be posted because it appears to be either spam or simply off topic to our filter. To bypass the filter you must include one of the following words in your message: sql,query If you just reply to this message, and include the entire text of it in the reply, your reply will go through. However, you should first review the text of the message to make sure it has something to do with MySQL. Just typing the word MySQL once will be sufficient, for example. You have written the following: Hi, I'm sure I read somewhere in the manual (but can't find it now) that an auto_increment column that is unsigned can be set to start from a specified number... can this be done, if so, how ? 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
Re: Easy way to insert data in MySQL DB
Also check out http://www.mysqlfront.de. No disrespect intended to MySQL. :) Regards, Kevin Smith -Original Message- From: Victoria Reznichenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: Tue, 26 Feb 2002 11:14:01 +0200 Subject: Easy way to insert data in MySQL DB Admin/Admin, Tuesday, February 26, 2002, 10:07:25 AM, you wrote: AA Hi, AAThx for all your help, I can export the tables in exportSQL scripts. AABut how to make the procedure of inserting data more easy instead of AA using mysql daemon od MySQL GUI?? Both of them need to use Sql language to AA insert data. Any software or tools like Microsoft Access or Lotus Approach AA which can make ppl who are not familar to MySQL can insert data very easy?? AA And they are free? Take a look at MyCC. See in the manual: http://www.mysql.com/downloads/gui-mycc.html -- 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
Re: Connect question
The two passwords in the connections are different perhaps??? - Original Message - From: Craig Westerman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 20, 2002 3:24 PM Subject: Connect question Below is two scripts. The first one connects fine. The second gives the following error. Parse error: parse error in /usr/www/users/abc/connect.php on line 1 What is the problem with the second script? Thanks in advance - Craig #1 - Works --- HTML HEAD TITLE Our List of Jokes /TITLE HEAD BODY ?php // Connect to the database server $dbcnx = @mysql_connect(localhost, root, DWZ9bBXe); if (!$dbcnx) { echo( PUnable to connect to the . database server at this time./P ); exit(); } // Select the jokes database if (! @mysql_select_db(jokes) ) { echo( PUnable to locate the joke . database at this time./P ); exit(); } ? P Here are all the jokes in our database: /P BLOCKQUOTE ?php // Request the text of all the jokes $result = mysql_query(SELECT JokeText FROM jokes); if (!$result) { echo(PError performing query: . mysql_error() . /P); exit(); } // Display the text of each joke in a paragraph while ( $row = mysql_fetch_array($result) ) { echo(P . $row[JokeText] . /P); } ? /BLOCKQUOTE /BODY /HTML --- --- #2 Errors --- html head titleConnect to a MySQL Server/title /head body ?php $dbcnx = @mysql_connect(localhost, root, DwZ9bBXe); if ($dbcnx != FALSE) { print The connection to the server was made successfully.; } else { print The connection to the server failed.; } mysql_close($dbcnx); ? /body /html - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Connect question
Why bother with the line : if ($dbcnx != FALSE) When you could use : if (!$dbcnz) . ? - Original Message - From: Craig Westerman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 20, 2002 3:24 PM Subject: Connect question Below is two scripts. The first one connects fine. The second gives the following error. Parse error: parse error in /usr/www/users/abc/connect.php on line 1 What is the problem with the second script? Thanks in advance - Craig #1 - Works --- HTML HEAD TITLE Our List of Jokes /TITLE HEAD BODY ?php // Connect to the database server $dbcnx = @mysql_connect(localhost, root, DWZ9bBXe); if (!$dbcnx) { echo( PUnable to connect to the . database server at this time./P ); exit(); } // Select the jokes database if (! @mysql_select_db(jokes) ) { echo( PUnable to locate the joke . database at this time./P ); exit(); } ? P Here are all the jokes in our database: /P BLOCKQUOTE ?php // Request the text of all the jokes $result = mysql_query(SELECT JokeText FROM jokes); if (!$result) { echo(PError performing query: . mysql_error() . /P); exit(); } // Display the text of each joke in a paragraph while ( $row = mysql_fetch_array($result) ) { echo(P . $row[JokeText] . /P); } ? /BLOCKQUOTE /BODY /HTML --- --- #2 Errors --- html head titleConnect to a MySQL Server/title /head body ?php $dbcnx = @mysql_connect(localhost, root, DwZ9bBXe); if ($dbcnx != FALSE) { print The connection to the server was made successfully.; } else { print The connection to the server failed.; } mysql_close($dbcnx); ? /body /html - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 error code 1044 ?
Exactly what the error message says. In other words you do not have the correct permissions to access the mysql database. - Original Message - From: bc203 [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 20, 2002 3:31 PM Subject: What is error code 1044 ? Now I can not open my all databases. The error following: [root@linuxserver /root] # mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with;or \g. Your MySQL connection id is 1 to server version: 3.22.32 Type 'help' for help. mysql use mysql; ERROR 1044: Access denied for user:'@localhost' to database 'mysql' mysql select * from user; ERROR 1046: No Database Selected mysql Please tell me what wrong my Mysql is? Thanks. -- ¹úÄÚÊÕ·ÑÓÊÏäË×îÇ¿£¬Ê×´ÎȨÍþÆÀ²â¼û·ÖÏþ http://news.21cn.com/domestic/21CN/2001-11-19/550568.html ÂòÆóÒµÓÊÏ䣬»ñÔùÓòÃû http://mail.21cn.com/corporation/010.html 21cn´øÄú×ß½øÄ¿±êÖ®Âã¬ÏíÊÜÉÌÂÃÀÖȤ http://travel.21cn.com/agency/aimtrip/aimtrip.html ÊÕ·ÑÓÊÏäÕæÄÜ´óÐÐÆäµÀ£¬¸øÎÒÒ»¸öÀíÓÉ http://mail.21cn.com/bijiao/index2-7.html - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: errno: 138
I think it's because it's the old structure, try this... BUT, back-up your database files first! Check that the owner of the database files are MySQL and that they have the correct permissions, then run the following statement : alter table customers type=MyISAM; K - Original Message - From: Simon Green [EMAIL PROTECTED] To: 'Mysql (E-mail)' [EMAIL PROTECTED] Sent: Wednesday, February 13, 2002 12:59 PM Subject: errno: 138 Hi I have just moved a copy of a database from and old MySQL server to a new one. But I am geting the folowing error. ---snip--- mysql select * from customers; ERROR 1016: Can't open file: 'customers.ISD'. (errno: 138) ---snip--- Can some one please tell me what this error is, or tell me where I can find a list of error to what the problem is. Thanks Simon Green - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: LOAD_FILE over SMB filesystems
After reading some other posts on inserting a image into a blob field, I tried using DBI to insert and the following does not work... I've double-checked the path and it is correct. $imageFN = '/var/www/htdocs/corporate/images/homenew.jpg'; $SQL = UPDATE banners SET image=load_file('$imageFN') where id=1; If I execute the same SQL statement at the MySQL prompt it inserts into the database fine... what am I doing wrong? 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
Re: LOAD_FILE over SMB filesystems
That was the problem, I print out $SQL to the screen and it showed the correct SQL statement, I've tried as you suggested, but it still did not work... see my DBI debug output below if this will help? I checked the image path and it is definitely correct. Any ideas? Thanks, Kevin [root@server1 cgi-bin]# perl blob.cgi DBI::db=HASH(0x81b34a0) trace level set to 2 in DBI 1.14-nothread Note: perl is running without the recommended perl -w option - prepare for DBD::mysql::db (DBI::db=HASH(0x81b34b8)~0x81b34a0 'UPDATE banners SET banners.image = LOAD_FILE('/var/www/htdocs/corporate/images/homenew.jpg') where banners.id=1') Setting mysql_use_result to 0 - prepare= DBI::st=HASH(0x8196e48) at blob.cgi line 17. - trace in DBD::_::common for DBD::mysql::st (DBI::st=HASH(0x8196e48)~0x81bcd04 2) - trace= 2 at blob.cgi line 18. - execute for DBD::mysql::st (DBI::st=HASH(0x8196e48)~0x81bcd04) - dbd_st_execute for 081bccf8 - dbd_st_execute 0 rows - execute= '0E0' at blob.cgi line 20. - finish for DBD::mysql::st (DBI::st=HASH(0x8196e48)~0x81bcd04) - finish= 1 at blob.cgi line 25. - disconnect for DBD::mysql::db (DBI::db=HASH(0x81b34b8)~0x81b34a0) imp_dbh-svsock: 8150e5c - disconnect= 1 at blob.cgi line 26. - DESTROY for DBD::mysql::st (DBI::st=HASH(0x81bcd04)~INNER) - DESTROY= undef during global destruction. - DESTROY for DBD::mysql::db (DBI::db=HASH(0x81b34a0)~INNER) - DESTROY= undef during global destruction. - Original Message - From: Gerald Clark [EMAIL PROTECTED] To: Kevin Smith [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, February 01, 2002 5:32 PM Subject: Re: LOAD_FILE over SMB filesystems The single quotes around $image prevent perl from substituting the value. You are trying to load a file named $imageFN. $SQL = UPDATE banners SET image=load_file(\$imageFN\) where id=1; Kevin Smith wrote: After reading some other posts on inserting a image into a blob field, I tried using DBI to insert and the following does not work... I've double-checked the path and it is correct. $imageFN = '/var/www/htdocs/corporate/images/homenew.jpg'; $SQL = UPDATE banners SET image=load_file('$imageFN') where id=1; If I execute the same SQL statement at the MySQL prompt it inserts into the database fine... what am I doing wrong? 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: LOAD_FILE over SMB filesystems
Yes, it definitely is... I'm running Apache 1.3.22 on Linux RedHat 7.1 and MySQL 3.23.47. - Original Message - From: Paul DuBois [EMAIL PROTECTED] To: Gerald Clark [EMAIL PROTECTED]; Kevin Smith [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, February 01, 2002 5:37 PM Subject: Re: LOAD_FILE over SMB filesystems At 11:32 -0600 2/1/02, Gerald Clark wrote: The single quotes around $image prevent perl from substituting the value. You are trying to load a file named $imageFN. $SQL = UPDATE banners SET image=load_file(\$imageFN\) where id=1; But the single quotes are within a double-quoted string. So shouldn't the substitution still occur? Is the web server running on the same host as the MySQL server? Kevin Smith wrote: After reading some other posts on inserting a image into a blob field, I tried using DBI to insert and the following does not work... I've double-checked the path and it is correct. $imageFN = '/var/www/htdocs/corporate/images/homenew.jpg'; $SQL = UPDATE banners SET image=load_file('$imageFN') where id=1; If I execute the same SQL statement at the MySQL prompt it inserts into the database fine... what am I doing wrong? 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 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: LOAD_FILE over SMB filesystems
I don't get an error message... I'm actually running the script from the shell prompt, so I'm totally mystified about why it's not working. Here is the DBI debug : [root@server1 cgi-bin]# perl blob.cgi DBI::db=HASH(0x81b34a0) trace level set to 2 in DBI 1.14-nothread Note: perl is running without the recommended perl -w option - prepare for DBD::mysql::db (DBI::db=HASH(0x81b34b8)~0x81b34a0 'UPDATE banners SET banners.image = LOAD_FILE('/var/www/htdocs/corporate/images/homenew.jpg') where banners.id=1') Setting mysql_use_result to 0 - prepare= DBI::st=HASH(0x8196e48) at blob.cgi line 17. - trace in DBD::_::common for DBD::mysql::st (DBI::st=HASH(0x8196e48)~0x81bcd04 2) - trace= 2 at blob.cgi line 18. - execute for DBD::mysql::st (DBI::st=HASH(0x8196e48)~0x81bcd04) - dbd_st_execute for 081bccf8 - dbd_st_execute 0 rows - execute= '0E0' at blob.cgi line 20. - finish for DBD::mysql::st (DBI::st=HASH(0x8196e48)~0x81bcd04) - finish= 1 at blob.cgi line 25. - disconnect for DBD::mysql::db (DBI::db=HASH(0x81b34b8)~0x81b34a0) imp_dbh-svsock: 8150e5c - disconnect= 1 at blob.cgi line 26. - DESTROY for DBD::mysql::st (DBI::st=HASH(0x81bcd04)~INNER) - DESTROY= undef during global destruction. - DESTROY for DBD::mysql::db (DBI::db=HASH(0x81b34a0)~INNER) - DESTROY= undef during global destruction. - Original Message - From: Paul DuBois [EMAIL PROTECTED] To: Kevin Smith [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, February 01, 2002 5:43 PM Subject: Re: LOAD_FILE over SMB filesystems At 17:41 + 2/1/02, Kevin Smith wrote: Yes, it definitely is... I'm running Apache 1.3.22 on Linux RedHat 7.1 and MySQL 3.23.47. Does the script connect to the MySQL server using a MySQL account that has the FILE privilege? By the way, you didn't report the error message that you get. What is it? - Original Message - From: Paul DuBois [EMAIL PROTECTED] To: Gerald Clark [EMAIL PROTECTED]; Kevin Smith [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, February 01, 2002 5:37 PM Subject: Re: LOAD_FILE over SMB filesystems At 11:32 -0600 2/1/02, Gerald Clark wrote: The single quotes around $image prevent perl from substituting the value. You are trying to load a file named $imageFN. $SQL = UPDATE banners SET image=load_file(\$imageFN\) where id=1; But the single quotes are within a double-quoted string. So shouldn't the substitution still occur? Is the web server running on the same host as the MySQL server? Kevin Smith wrote: After reading some other posts on inserting a image into a blob field, I tried using DBI to insert and the following does not work... I've double-checked the path and it is correct. $imageFN = '/var/www/htdocs/corporate/images/homenew.jpg'; $SQL = UPDATE banners SET image=load_file('$imageFN') where id=1; If I execute the same SQL statement at the MySQL prompt it inserts into the database fine... what am I doing wrong? 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
Re: LOAD_FILE over SMB filesystems
Just to let everyone know, the user must have their FILE permission in the MySQL authentication tables set to Y. Thank you to Paul DuBois for pointing this out to me. :) Kevin - Original Message - From: Paul DuBois [EMAIL PROTECTED] To: Kevin Smith [EMAIL PROTECTED] Cc: Sent: Friday, February 01, 2002 5:57 PM Subject: Re: LOAD_FILE over SMB filesystems At 17:47 + 2/1/02, Kevin Smith wrote: I don't get an error message... I'm actually running the script from the shell prompt, so I'm totally mystified about why it's not working. Umm, actually it is working, according to the trace below. execute() returns 0E0, which means the statement succeeded and update 0 rows. (Otherwise you'd get back under or the DBI would throw an exception, depending on whether you have RaiseError enabled.) So, either: - no row has an id value of 1, or - the row with an id value of 1 already has the exactly same image value, in which case MySQL knows that it's not actually changing the current value, and reports no rows changed. Assuming you have a row with id = 1, clear out the existing image value manually: UPDATE banners SET image = '' WHERE id = 1; Then try your script ag'in and see what happens. Here is the DBI debug : [root@server1 cgi-bin]# perl blob.cgi DBI::db=HASH(0x81b34a0) trace level set to 2 in DBI 1.14-nothread Note: perl is running without the recommended perl -w option - prepare for DBD::mysql::db (DBI::db=HASH(0x81b34b8)~0x81b34a0 'UPDATE banners SET banners.image = LOAD_FILE('/var/www/htdocs/corporate/images/homenew.jpg') where banners.id=1') Setting mysql_use_result to 0 - prepare= DBI::st=HASH(0x8196e48) at blob.cgi line 17. - trace in DBD::_::common for DBD::mysql::st (DBI::st=HASH(0x8196e48)~0x81bcd04 2) - trace= 2 at blob.cgi line 18. - execute for DBD::mysql::st (DBI::st=HASH(0x8196e48)~0x81bcd04) - dbd_st_execute for 081bccf8 - dbd_st_execute 0 rows - execute= '0E0' at blob.cgi line 20. - finish for DBD::mysql::st (DBI::st=HASH(0x8196e48)~0x81bcd04) - finish= 1 at blob.cgi line 25. - disconnect for DBD::mysql::db (DBI::db=HASH(0x81b34b8)~0x81b34a0) imp_dbh-svsock: 8150e5c - disconnect= 1 at blob.cgi line 26. - DESTROY for DBD::mysql::st (DBI::st=HASH(0x81bcd04)~INNER) - DESTROY= undef during global destruction. - DESTROY for DBD::mysql::db (DBI::db=HASH(0x81b34a0)~INNER) - DESTROY= undef during global destruction. - Original Message - From: Paul DuBois [EMAIL PROTECTED] To: Kevin Smith [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, February 01, 2002 5:43 PM Subject: Re: LOAD_FILE over SMB filesystems At 17:41 + 2/1/02, Kevin Smith wrote: Yes, it definitely is... I'm running Apache 1.3.22 on Linux RedHat 7.1 and MySQL 3.23.47. Does the script connect to the MySQL server using a MySQL account that has the FILE privilege? By the way, you didn't report the error message that you get. What is it? - Original Message - From: Paul DuBois [EMAIL PROTECTED] To: Gerald Clark [EMAIL PROTECTED]; Kevin Smith [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, February 01, 2002 5:37 PM Subject: Re: LOAD_FILE over SMB filesystems At 11:32 -0600 2/1/02, Gerald Clark wrote: The single quotes around $image prevent perl from substituting the value. You are trying to load a file named $imageFN. $SQL = UPDATE banners SET image=load_file(\$imageFN\) where id=1; But the single quotes are within a double-quoted string. So shouldn't the substitution still occur? Is the web server running on the same host as the MySQL server? Kevin Smith wrote: After reading some other posts on inserting a image into a blob field, I tried using DBI to insert and the following does not work... I've double-checked the path and it is correct. $imageFN = '/var/www/htdocs/corporate/images/homenew.jpg'; $SQL = UPDATE banners SET image=load_file('$imageFN') where id=1; If I execute the same SQL statement at the MySQL prompt it inserts into the database fine... what am I doing wrong? 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
Re: Running SQL Scripts
Hi, This should do the trick mysql source /path/to/file.sql or shell mysql databasename /path/to/file.sql And it doesn't matter about the file extension. Kevin - Original Message - From: Jarlath . Hennelly [EMAIL PROTECTED] To: MySQL (E-mail) [EMAIL PROTECTED] Sent: Tuesday, January 22, 2002 1:18 PM Subject: Running SQL Scripts Dudes Dudettes, I got a SQL script with all the SQL to setup a database. But I can't seem to access the script. I did this before so I know it can be done, but I've to do it for a new project, and I can't remeber how. So I've 2 questions : - Does my script file need to be a .sql file or just a plain .txt file??? - What command do I use : mysql file_name Is this correct Any help would be greatly appreciated. cheers, J - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
Linux Install Problem
Hi, Can anyone shed some light on this problem I got when trying to compile on a Linux platform? /usr/local/mysql/lib/mysql ../libmysql/.libs/libmysqlclient.so: undefined reference to `atexit' collect2: ld returned 1 exit status 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
Re: Not In
Thanks, Roger... just about to say the same thing. K - Original Message - From: Mohamed Abd El-Samei Mohamed [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 13, 2001 12:26 PM Subject: Fw: Not In mysql select * from radacct where NOT EXISTS ( select username from radacct w here acctstarttime =2001-11-30 00:00:00 ); ERROR 1064: You have an error in your SQL syntax near 'EXISTS ( select username from radacct where acctstarttime =2001-11-30 00:00:0' at line 1 mysql - Original Message - From: Kevin Smith [EMAIL PROTECTED] To: Mohamed Abd El-Samei Mohamed [EMAIL PROTECTED] Sent: Thursday, December 13, 2001 2:25 PM Subject: Re: Not In Post the SQL statement so we can have a look at it. - Original Message - From: Mohamed Abd El-Samei Mohamed [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 13, 2001 12:17 PM Subject: Not In Sorry .. nut i need to select from table and the selection related to date i want to use NOT IN or NOT EXISTS .. but i got error in syn. when i do .. please 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 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 function sum() on float values
Hi, This is what I got on a Windows 2000 platform mysql create table ft (id INT AUTO_INCREMENT, val FLOAT, PRIMARY KEY(id)); Query OK, 0 rows affected (0.01 sec) mysql insert ft(val) values('3.4'); Query OK, 1 row affected (0.00 sec) mysql insert ft(val) values('0.3'); Query OK, 1 row affected (0.00 sec) mysql insert ft(val) values('1.24'); Query OK, 1 row affected (0.00 sec) mysql select sum(val) from ft; +-+ | sum(val)| +-+ | 4.941168251 | +-+ 1 row in set (0.02 sec) mysql select version(); ++ | version() | ++ | 3.23.45-nt | ++ 1 row in set (0.00 sec) Regards, Kevin - Original Message - From: Wojciech Drek [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 13, 2001 3:12 PM Subject: Problems with function sum() on float values I wonder if it is only question of configuration but my MySQL server has problems with suming of float values. Look at that script: # mysql Ver 11.15 Distrib 3.23.41, for redhat-linux-gnu (i386) # -- create table ft (id INT AUTO_INCREMENT, val FLOAT, PRIMARY KEY(id)); insert ft(val) values('3.4'); insert ft(val) values('0.3'); insert ft(val) values('1.24'); select * from ft; select sum(val) from ft; - It will generate this (at the end) : ... mysql select sum(val) from ft; +-+ | sum(val)| +-+ | 4.941168251 | ?? +-+ 1 row in set (0.00 sec) - Is it repeatable in someone else's MySQL server ? Wojtek Drazek - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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
MyODBC: DSN Creation
Hi All, I need to setup MyODBC DSN's for MySQL access. Does anyone know how to build a simple installer that will create User/System DSN's from a file? ie. like the odbc.inf file included with the MyODBC installer? Can odbcconf.exe be used to install a DSN? If so, what are the parameters used to create a DSN, can you give me a good example. Many 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
HUGE Table Help
Hi All, I'm considering making a huge table, by that I mean approx. 26 millions records which will be static data, no updates, or deletes, etc. will be performed on this table, only select statements. The schema on the table will be as follows.. The address fields will be 56 characters long and the post code 7 characters. Address 1 Address 2 Address 3 Address 4 Address 5 Address 6 Address 7 Post Code At a guess the raw data may be in the region of 9GB. My question is, if I was to do a search on the Post Code (never on any address fields) what sort of performance can I expect from a Dual Zeon 933Mhz CPUs running Windows 2000 Pro Server with 512MB RAM? This is based on the fact the the post code field will be indexed and perhaps an additional index that indexes the first two characters of the post code and therefore narrows down the search to specific records to begin with, ie. OX16 0TH, index this and then create an index with the characters OX... Any advice on this or am I in a sinking boat? Many thanks, Kevin Smith - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Execute a file containing a sql script
mysql source /path/to/file - Original Message - From: TOMASSONI Dominique [EMAIL PROTECTED] To: 'MySQL_mailing_list' [EMAIL PROTECTED] Sent: Monday, October 22, 2001 5:08 PM Subject: Execute a file containing a sql script Hi, I'm a beginner in MySQL (also in english) so sorry for my uninterristing questions. I've installed MySQL 3.23.43 on a Linux RedHat 7.0 system, and it seems to work normally. How to execute a sql script which is inclus in a text file (ex : script.sql) ? With Oracle, you know, it's done with @script.sql. Thank you for your answers. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Any workaround for no union operation?
Is there no easy way to do this in the current version (3.29.39) without using a program that loops through to perform each update? Thanks, Kevin - Original Message - From: Sinisa Milivojevic [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Sunday, July 15, 2001 12:13 PM Subject: Re: Any workaround for no union operation? Kevin Smith writes: Will the following be in version 4 as well? UPDATE table1 SET cola = SELECT [colb] FROM table2 WHERE table1.id = table2.id And sub-selects as well? Thanks, Kevin Multi-table updates should come in 4.0, while sub-selects will come in 4.1. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Any workaround for no union operation?
Will the following be in version 4 as well? UPDATE table1 SET cola = SELECT [colb] FROM table2 WHERE table1.id = table2.id And sub-selects as well? Thanks, Kevin - Original Message - From: Sinisa Milivojevic [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, July 14, 2001 1:24 PM Subject: Re: Any workaround for no union operation? Hi! Unions will soon come in 4.0. Meanwhile, your query can utilize indices if you have a composite index on seller and buyer. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MyODBC 2.50.37 and Access 2000
Hi All, I've installed MySQL 3.23.39 on my Windows 2000 Pro Server and I am currently developing a database using Access 2000 as a front-end to MySQL using MyODBC 2.50.37. I have all my MySQL tables linked as ODBC tables in Access. When I am inputting data into an Access Form and then save the record, all the fields are changed to #DELETED. The record data is saved I know, but why do the fields all change to #DELETED when the record is inserted into the MySQL table? Is there a fix for this, or, it is just the case of using ADO to do the insert and just refresh the Access Form to then move to the record itself... a bit of a pain though... Any ideas? Many thanks, Kevin Smith - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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.org
What really pisses me off about companies is when they steal ideas and blantly try and sell those ideas and don't think about what impact they will have on the Open Source community and the persons involved who dedicate their lives to developing fantastic software for people to use. I'm 101% behind MySQL.com, unfortunately with these scenerios if you don't go through the correct legal action channels, you'll end up making the situation worse. Perhaps a few DoS attacks? Just kidding.. ;) If only I knew how. :( Kevin - Original Message - From: Joel Hughes [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, July 13, 2001 9:50 AM Subject: RE: mysql.org Can't we pull the mysql.org domain from under them? Surely this breaches domain name usage? joel -Original Message- From: Michael Widenius [mailto:[EMAIL PROTECTED]] Sent: 13 July 2001 06:39 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: mysql.org Hi! Enhanced MySQL(tm) is as the words say a value-added version of MySQL available from NuSphere and is available as part of two products that contain NuSphere MySQL: NuSphere MySQL Advantage and NuSphere Pro Advantage (which also includes a really nice PHP IDE if you haven't seen it). Take a look at http://nusphere.com for more. As we have publically stated, we expect to release the source code for Gemini as part of MySQL V4, given the delay in releasing V4 we have decided to release gemini source via mysql.org as a way to kick off this new non-commercial community site formed for support of mysql. Take a look at http://mysql.org for more. Britt... -- D. Britton Johnston 603-578-6707 Nashua Chief Technology Officer 781-280-4954 Bedford NuSphere Corporation 781-280-4600 Main 14 Oak Park 781-280-4646 Fax Bedford, MA 01730 www.nusphere.com Those that have been on this email list a long time should know that I seldom lose my temper. The above email however went far beyond the limit I can stand. By acquiring, without our knowledge or approval, mysql.org and putting what they call a 'community' website on it, NuSphere has violated both the MySQL(tm) trademark and the copyright of MySQL AB. If we aren't hard on them, MySQL AB could lose a major part of our income, which we put into developing the MySQL(tm) server. I want to stress that to date, NuSphere has contributed nothing, no money or source, to the development of the MySQL(tm) server. What they have done instead is doing a fork of the MySQL distribution and making a non-open source distribution that clearly violates the GPL license. What NuSphere seems to be trying to do is to get people to approve of their fork, get more people to work on it, and cause confusion among MySQL users as to where the origin of the MySQL(tm) source and documentation is. What NuSphere has done indicates that they want to be regarded as being in the center of MySQL(tm) server development and use this as a leverage to push their commercial products that are not open source. The truth is that NuSphere has nothing to do with the development of the MySQL(tm) server. mysql.org doesn't provide anything significant that http://www.mysql.com wouldn't provide. Instead they are forcing people to register to be able to download anything. They are gathering names for reasons we can only guess. I have spent the last 6 years working on the MySQL(tm) server on average 10 hours per day, seven days a week. The other MySQL developers and I have personally helped tens of thousands of MySQL users with their problems and now NuSphere is trying to take that away from us. All the code in the MySQL(tm) server is either written by developers employed by MySQL AB (that's including me) or has been signed over to us by MySQL users as a thanks for what we have provided to them. If anyone has any comments about how we at MySQL AB work as an open source company, please write to our CEO Marten Mickos via [EMAIL PROTECTED] and we will welcome your suggestions. We are totally dependent on the trust of our users, as everything we do are open source, and we are trying hard to do everything in our power to make life easier for our users. We at MySQL AB have already taken the necessary legal steps to defend our rights. We would however need help from all MySQL users to properly defend ourselves. If you want to help us, please help us with the following: - If you now have a link in your website or browser to mysql.org because you think it is the authorized MySQL AB site, please consider pointing that link to www.mysql.com - Inform everyone you know about the true nature of mysql.org, - Send your honest comments about this unfortunate situation, and report all instances of confusion concerning mysql.org to us at [EMAIL PROTECTED] If you don't have time to fight for us, you can support us in this fight by purchasing a MySQL(tm) server license at https://order.mysql.com/ Please spread the word and
Re: (win 2000 + mysql) = problem
What does it say in your, C:\mysql\data\mysql.err file? - Original Message - From: Andrey Goncharenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 13, 2001 10:03 AM Subject: (win 2000 + mysql) = problem I install mysql (v 3.23.39) on Windows 2000 pro, but server is not run:( Plese, help me... What I must to make? ó Õ×ÁÖÅÎÉÅÍ, áÎÄÒÅÊ. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: MyODBC 2.50.37 and Access 2000
Hi, I didn't get a reply to this, so I guess no one knows, or, it's on the wrong forum. Can any set me straight on this? Cheers, Kevin - Original Message - From: Kevin Smith [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 13, 2001 10:24 AM Subject: MyODBC 2.50.37 and Access 2000 Hi All, I've installed MySQL 3.23.39 on my Windows 2000 Pro Server and I am currently developing a database using Access 2000 as a front-end to MySQL using MyODBC 2.50.37. I have all my MySQL tables linked as ODBC tables in Access. When I am inputting data into an Access Form and then save the record, all the fields are changed to #DELETED. The record data is saved I know, but why do the fields all change to #DELETED when the record is inserted into the MySQL table? Is there a fix for this, or, it is just the case of using ADO to do the insert and just refresh the Access Form to then move to the record itself... a bit of a pain though... Any ideas? Many thanks, Kevin Smith - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: MyODBC 2.50.37 and Access 2000
Yes, each record has a primary key, but not a timestamp. Does this make any difference? This also happens with my Unix machine which has MySQL installed on it. I have had the problem for about a year, but now that I'm starting to use MySQL in real-time applications I'm developing at work, this is a real bug bear and one that I'm surprised no one knows about. Thanks, Kevin - Original Message - From: Joshua J. Kugler [EMAIL PROTECTED] To: Kevin Smith [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, July 13, 2001 10:30 PM Subject: Re: MyODBC 2.50.37 and Access 2000 This may be a silly question, but since you didn't state it in your e-mail: does each record have a primary key AND a timestamp field? j- k- On Friday 13 July 2001 01:24, Kevin Smith wrote: Hi All, I've installed MySQL 3.23.39 on my Windows 2000 Pro Server and I am currently developing a database using Access 2000 as a front-end to MySQL using MyODBC 2.50.37. I have all my MySQL tables linked as ODBC tables in Access. When I am inputting data into an Access Form and then save the record, all the fields are changed to #DELETED. The record data is saved I know, but why do the fields all change to #DELETED when the record is inserted into the MySQL table? Is there a fix for this, or, it is just the case of using ADO to do the insert and just refresh the Access Form to then move to the record itself... a bit of a pain though... Any ideas? Many thanks, Kevin Smith - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- Joshua Kugler, Information Services Director Associated Students of the University of Alaska Fairbanks [EMAIL PROTECTED], 907-474-7601 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mysql and PHP problems
I know this sounds bizarre, but I believe that error means the your SQL statement did not return any rows and you don't have any error checking in place to cater for this. I know this, because I did the same thing. ;) Regards, Kevin - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 11, 2001 11:31 AM Subject: mysql and PHP problems I have Mysql 3.22 and PHP4 installed with RedHat 7.0 linux distribution.I created a script connecting my html page with mysql database(function mysql_pconnect).Everything was working just fine one day but on the next day I saw a message on my screen "Call to undefined function mysql_pconnect".Could someone tell me how is it possible? ---R--E--K--L--A--M--A--- Od 9 do 15 lipca na http://hiperpromocja.interia.pl/ niesamowita promocja! Odkurzacze i zmywarki renomowanej, niemieckiej firmy o 30% taniej! - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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] cookie problems
Hi Ken, Here's you answer : Common Pitfalls: a.. Cookies will not become visible until the next loading of a page that the cookie should be visible for. b.. Cookies must be deleted with the same parameters as they were set with. Check out : http://www.php.net/manual/en/function.setcookie.php Regards, Kevin Smith - Original Message - From: Ken Sommers [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Brad Lipovsky [EMAIL PROTECTED] Sent: Wednesday, July 11, 2001 8:05 AM Subject: Re: [PHP-DB] cookie problems What didn;t work,,,what happened? Ken - Original Message - From: Brad Lipovsky [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 11:24 PM Subject: [PHP-DB] cookie problems can anyone help me with this code? i cant believe it wont work, it seems pretty simple! ?php setcookie (logged_in, logged in, time() - 3600); setcookie (logged_user_name, logged user name, time() - 3600); print $logged_in br; print $logged_user_name; ? brad -- 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 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
PHP and Mysql
Hi All, Has anyone ever had this problem when using PHP 4.06 and MySQL 3.23.39 running on Apache 1.3.20 on Windows 2000 Professional SP!? br bWarning/b: Supplied argument is not a valid MySQL result resource in bd:\program files\apache group\apache\www.lemonlaineydesign.com\www\top_frame.php/b on line b68/bbr And here is the line in my HTML... any ideas what might be wrong? This works on my Unix box with no problems... while ($results = mysql_fetch_array($sth)) { Thanks, Kevin Smith Netsmith Limited - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 and Mysql
Hit the nail on the head... infact, the problem wasn't the query itself, it was the way in which I imported the tables and data from a Unix platform to my Windows platform that caused the problems... sorry. Many thanks for you help, as it made me look at running the query as you suggested which caused me to realise the database wasn't able to be read by Windows. :) Thanks, Kevin - Original Message - From: Jason Burfield [EMAIL PROTECTED] To: Kevin Smith [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 4:15 PM Subject: Re: PHP and Mysql Kevin... This means that your result set is empty. Try running the query on the command line and see if you get a result. If you do, check the syntax in your code. If you don't, that's the problem. -- Jason On 7/8/01 5:40 AM, Kevin Smith was heard saying: Hi All, Has anyone ever had this problem when using PHP 4.06 and MySQL 3.23.39 running on Apache 1.3.20 on Windows 2000 Professional SP!? br bWarning/b: Supplied argument is not a valid MySQL result resource in bd:\program files\apache group\apache\www.lemonlaineydesign.com\www\top_frame.php/b on line b68/bbr And here is the line in my HTML... any ideas what might be wrong? This works on my Unix box with no problems... while ($results = mysql_fetch_array($sth)) { Thanks, Kevin Smith Netsmith Limited - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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