can mysql use an index where like used
Can Mysql 4.20 use an index where like 'xx%' is in the where clause against the column. i.e. index table1(col1) from table1 where table1.col1 like 'something%' Regards, Ben -- Ben Edwards - Bristol, UK If you have a problem emailing me use http://www.gurtlush.org.uk/profiles.php?uid=4 (email address this email is sent from may be defunct) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Getting list of queries run against a database
We are having a problem with out mysql database (4.2) and think we may have indexes missing. What we are trying to do is find out the most popular queries that run. We know there are not may and that they are relatively simple. Does anyone know of a tool that allows us to see what queries (i.e. via a log file) are/have been run against the database. If it counts how may times/how much resources each query uses that would be good. The icing on the cake would be a prog that told us what queries were doing full table scans and other expensive operations. Regards, Ben -- Ben Edwards - Bristol, UK If you have a problem emailing me use http://www.gurtlush.org.uk/profiles.php?uid=4 (email address this email is sent from may be defunct) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Data Dictionary
how do I access the Data Dictionary through SQL? What I want to do is loookup the length of a varchar for validation? Ben -- Ben Edwards - Poole, UK, England WARNING:This email contained partisan views - dont ever accuse me of using the veneer of objectivity If you have a problem emailing me use http://www.gurtlush.org.uk/profiles.php?uid=4 (email address this email is sent from may be defunct) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: [PHP-DB] mysql_error() (was Re: Getting last insert id?)
On Thu, 2003-10-09 at 16:33, pete M wrote: $new_id = mysql_query('select last_insert_id()'); your can also user it within a query - eg $sql = ' insert into related table parent_id, data , data2) values (last_insert_id(), 23, 45); Is there also a similar way of getting the last error message, i.e. $new_id = mysql_query('select error()'); I currently am trying to solve the problem or mysql_error() returning nothing after an error. It may be something to do with globals and something like the above may help. Ben -- * Ben Edwards Tel +44 (0)1179 553 551 ICQ 42000477 * * Homepage - nothing of interest here http://gurtlush.org.uk * * Webhosting for the masses http://www.serverone.co.uk * * Critical Site Builderhttp://www.criticaldistribution.com * * online collaborative web authoring content management system * * Get alt news/views films online http://www.cultureshop.org * * i-Contact Progressive Video http://www.videonetwork.org * * Fun corporate graphics http://www.subvertise.org * * Bristol Indymedia http://bristol.indymedia.org * * Bristol's radical news http://www.bristle.org.uk * -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Help With a DATETIME Query PLEASE!
On Wed, 2003-10-08 at 09:52, shaun thornburgh wrote: Hi, I have a table called Bookings which has two important columns; Booking_Start_Date and Booking_End_Date. These columns are both of type DATETIME. The following query calculates how many hours are available between the hours of 09.00 and 17.30 so a user can see at a glance how many hours they have unbooked on a particular day (i.e. 8.5 hours less the time of any bookings on that day). However, when a booking spans more than one day the query doesn't work, for example if a user has a booking that starts on day one at 09.00 and ends at 14.30 on the next day, the query returns 3.5 hours for both days. Any help here would be greatly appreciated. SELECT 8.5 - (SUM(((DATE_FORMAT(B.Booking_End_Date, '%k') * 60 ) + DATE_FORMAT(B.Booking_End_Date, '%i')) - ((DATE_FORMAT(B.Booking_Start_Date, '%k') * 60 ) + DATE_FORMAT(B.Booking_Start_Date, '%i'))) / 60) AS Available_Hours FROM WMS_Bookings B WHERE B.User_ID = '16' AND B.Booking_Status '1' AND NOT ( '2003-10-07' DATE_FORMAT(Booking_Start_Date, %Y-%m-%d) OR '2003-10-07' DATE_FORMAT(Booking_End_Date, %Y-%m-%d) ) Thanks for your help _ Find a cheaper internet access deal - choose one to suit you. http://www.msn.co.uk/internetaccess It would be a good idea to format your SQL so it can be read more easily, I am sure people would be more inclined to help you if you did this. I am sure PHP has date time functions that help with this. Have a look at the online manual or download it. Can't quite remember but I think there is an hour between function, go to php.net and look at the date/time function bit. If not try looking on the net for someone who has already written such a function, there probably is someone who has. Ben -- * Ben Edwards Tel +44 (0)1179 553 551 ICQ 42000477 * * Homepage - nothing of interest here http://gurtlush.org.uk * * Webhosting for the masses http://www.serverone.co.uk * * Critical Site Builderhttp://www.criticaldistribution.com * * online collaborative web authoring content management system * * Get alt news/views films online http://www.cultureshop.org * * i-Contact Progressive Video http://www.videonetwork.org * * Fun corporate graphics http://www.subvertise.org * * Bristol Indymedia http://bristol.indymedia.org * * Bristol's radical news http://www.bristle.org.uk * -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Limit queries
Add LIMIT x,y (x is first row and y the number of rows 1.e. 1,1 for first row) at the end of the SQL and order the SQL. Not sure if this helps, just initial thoughts. On Wed, 2003-10-08 at 13:04, Ciprian Trofin wrote: I have 2 tables: currencies and quotes currencies == id currency - quotes == id date id_currency value --- Index (date, id_currency - UNIQUE) In order to find the most recent value for a currency I use the following logic: 1. SELECT max(date), id_currency FROM quotes GROUP BY id_currency 2. for each set of values in result: SELECT C.currency, Q.value FROM quotes Q, currencies C WHERE C.id = Q.id_currency AND Q.date = $result[max_date] AND Q.id_currency = $result[id_currency] The procedure is quite slow, because for the 2nd step I have nnn queries where nnn = number of rows in the 1st step. Could you suggest a better and faster approach ? -- * Ben Edwards Tel +44 (0)1179 553 551 ICQ 42000477 * * Homepage - nothing of interest here http://gurtlush.org.uk * * Webhosting for the masses http://www.serverone.co.uk * * Critical Site Builderhttp://www.criticaldistribution.com * * online collaborative web authoring content management system * * Get alt news/views films online http://www.cultureshop.org * * i-Contact Progressive Video http://www.videonetwork.org * * Fun corporate graphics http://www.subvertise.org * * Bristol Indymedia http://bristol.indymedia.org * * Bristol's radical news http://www.bristle.org.uk * -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Sudden error when replicationg - please help
you are not using Debian testing by any chance? If so last time I did an apt-get upgrade it broke mysql and I fixed it by doing a reinstall. On Wed, 2003-10-08 at 14:13, Søren Neigaard wrote: I have a slave that has been running for a long time without any problems, but now its not replicating any more. So I tried to do a LOAD DATA MASTER; which always gives me this error now: Version: '4.0.15-standard-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 031008 15:07:59 Slave I/O thread: connected to master '[EMAIL PROTECTED]:3306', replication started in log 'mysql-bin.006' at position 357019 031008 15:08:14 Slave I/O thread exiting, read up to log 'mysql-bin.006', position 357019 031008 15:08:14 Couldn't fix table with quick recovery: Found wrong number of deleted records 031008 15:08:14 Run recovery again without -q 031008 15:08:14 Note: Retrying repair of: './otamanager/otafrontenduser' with keycache 031008 15:08:14 Couldn't fix table with quick recovery: Found wrong number of deleted records 031008 15:08:14 Run recovery again without -q 031008 15:08:14 Note: Retrying repair of: './otamanager/profile' with keycache 031008 15:08:16 Slave I/O thread: connected to master '[EMAIL PROTECTED]:3306', replication started in log 'mysql-bin.006' at position 357019 I have tried to do a REPAIR TABLE otafrontenduser,profile EXTENDED; but no success (its says ok, but the replication does still not work). Why and what are these errors, and what can I do? Med venlig hilsen/Best regards Søren Neigaard System Architect Mobilethink A/S Arosgaarden Åboulevarden 23, 4.sal DK - 8000 Århus C Telefon: +45 86207800 Direct: +45 86207810 Fax: +45 86207801 Email: [EMAIL PROTECTED] Web: www.mobilethink.dk -- * Ben Edwards Tel +44 (0)1179 553 551 ICQ 42000477 * * Homepage - nothing of interest here http://gurtlush.org.uk * * Webhosting for the masses http://www.serverone.co.uk * * Critical Site Builderhttp://www.criticaldistribution.com * * online collaborative web authoring content management system * * Get alt news/views films online http://www.cultureshop.org * * i-Contact Progressive Video http://www.videonetwork.org * * Fun corporate graphics http://www.subvertise.org * * Bristol Indymedia http://bristol.indymedia.org * * Bristol's radical news http://www.bristle.org.uk * -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Easy (?) conditional SELECT
On Wed, 2003-10-08 at 15:06, Mark Wilson wrote: Er, I _used_ a basic SQL tutorial, which specifically said that this should work. The problem seems to be a limitation of MySQL, not general SQL operation. That being said, are there any clever one-query options (using JOINs, etc?) or is this basically a 2-step process in MySQL? Actually I just reread the SQL. MySQL 3 douse not support sub-queries. I think 4 might and I think subqueries are in the ANSI 95 SQL standard (or was it 92). It douse have to be done in a two step operation for this type of max function. The other option, if you can order the query, is to use the LIMIT clause (mysql specific). LIMIT x,y, x=first row and y=number of rows. So if you ordered your query with the row you wanted first add LIMIT 1,1 at the beginning. Ben -- * Ben Edwards Tel +44 (0)1179 553 551 ICQ 42000477 * * Homepage - nothing of interest here http://gurtlush.org.uk * * Webhosting for the masses http://www.serverone.co.uk * * Critical Site Builderhttp://www.criticaldistribution.com * * online collaborative web authoring content management system * * Get alt news/views films online http://www.cultureshop.org * * i-Contact Progressive Video http://www.videonetwork.org * * Fun corporate graphics http://www.subvertise.org * * Bristol Indymedia http://bristol.indymedia.org * * Bristol's radical news http://www.bristle.org.uk * -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Easy (?) conditional SELECT
You cant have subqueries (select from where) in the where clause. On Wed, 2003-10-08 at 15:00, Mark Wilson wrote: BTW, I tested the SELECT(MAX) part of this separately, and discovered that MySQL doesn't like the single quotes around the table name, so I took them out. Now THIS query works: SELECT MAX( plan_submission_number ) FROM artifacts WHERE product_id = '1' -- (returns '2') But this one still doesn't: SELECT * from artifacts WHERE (product_id = '1' AND plan_submission_number = (SELECT MAX( plan_submission_number ) FROM artifacts WHERE product_id = '1') ) Although that seems as if it should be equivalent to the following hard-coded version: SELECT * FROM `artifacts` WHERE (product_id = '1' AND plan_submission_number = '2') -- Mark Wilson, Computer Programming Unlimited (cpuworks.com) Web : http://cpuworks.com Tel: 410-549-6006 Email: [EMAIL PROTECTED] Fax: 410-549-4408 Quoting Mark Wilson [EMAIL PROTECTED]: I have an app for which people can submit plans. Each plan relates to a particular product. A new plan can be submitted for the same product, so each plan has its own submission number. (1,2,3...) Each plan is composed of artifacts. The (artifacts) table looks like this: artifact_id INT product_id INT plan_submission_number INT (etc) Task: get all the items for the most recent (i.e., highest) submission plan for a particular product. Since I'm relatively new to MySQL, and haven't mastered much beyond the most basic SELECTs, much less JOINs, I'm not sure how to do this. I think the following should work (for product_id = 1), but it returns a syntax error. SELECT * FROM `artifacts` WHERE ( product_id = '1' AND plan_submission_number = ( SELECT MAX( plan_submission_number ) FROM 'artifacts' WHERE product_id = '1' ) ) --- Error message: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT MAX( plan_submission_number ) FROM 'artifacts' WHERE p --- What am I missing? Thanks - Mark -- Mark Wilson, Computer Programming Unlimited (cpuworks.com) Web : http://cpuworks.com Tel: 410-549-6006 Email: [EMAIL PROTECTED] Fax: 410-549-4408 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- * Ben Edwards Tel +44 (0)1179 553 551 ICQ 42000477 * * Homepage - nothing of interest here http://gurtlush.org.uk * * Webhosting for the masses http://www.serverone.co.uk * * Critical Site Builderhttp://www.criticaldistribution.com * * online collaborative web authoring content management system * * Get alt news/views films online http://www.cultureshop.org * * i-Contact Progressive Video http://www.videonetwork.org * * Fun corporate graphics http://www.subvertise.org * * Bristol Indymedia http://bristol.indymedia.org * * Bristol's radical news http://www.bristle.org.uk * -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysql_error() returning nothing
I have been having this problem for a long time. A while ago I wrote the below functions to handle database errors. They used to display the message and email it to me. Now mysql_error() returns nothing! Any help would be greatly appreciated, as you can imagine this is causing a lot of problems. Are they any other ways of getting the error? Ben function query_db( $sql, $db ) { $result = mysql_query( $sql, $db ) or error_db( $sql, $db ); return $result; } function error_db( $sql, $db ) { global $SERVER_NAME, $SCRIPT_NAME; table_top( Database Error ); table_middle(); $sqlerr = mysql_error( $db ); echo bSQL:/b:BR$sqlbrbError:/bBR$sqlerr; table_bottom(); // Clost of table/html from calling script table_bottom(); html_footer(); // Send error via email $msg = Application error has accured on CriticalDistribution instalation . on '$SERVER_NAME'. The error message is :-\n\n. SQL:$sql\n\nError:$sqlerr\n\n. This message was . generated by '$SERVER_NAME/$SCRIPT_NAME'; $subj = CritDist App error from $SERVER_NAME; // Hard coded to minimize chance of this module erroring $to = CriticalDistribution [EMAIL PROTECTED]; $from = From: .$to; mail($to, $subj, $msg, $from); die(); } -- * Ben Edwards Tel +44 (0)1179 553 551 ICQ 42000477 * * Homepage - nothing of interest here http://gurtlush.org.uk * * Webhosting for the masses http://www.serverone.co.uk * * Critical Site Builderhttp://www.criticaldistribution.com * * online collaborative web authoring content management system * * Get alt news/views films online http://www.cultureshop.org * * i-Contact Progressive Video http://www.videonetwork.org * * Fun corporate graphics http://www.subvertise.org * * Bristol Indymedia http://bristol.indymedia.org * * Bristol's radical news http://www.bristle.org.uk * -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Free Text Search Min Word Length
Thanks, in the message you pointed me to set-variable = ft_min_word_len=3 (mysql defaults to 4) is what is required, but how do I do this from PHP (I am using shared hosting so don't have access to the MySQL config file). Ben At 18:56 30/03/2003 -0800, Adam Randall wrote: Could anyone please let me know how to set the min word lenght to 3 for Free Text search, I am using PHP. Ben Regards, Ben Check out this message: http://www.listsearch.com/mysql.lasso?id=287087 Adam. --- Adam Randall http://www.xaren.net/ [EMAIL PROTECTED] http://nt.xaren.net/ [EMAIL PROTECTED]AIM/iChat: blitz574 Macintosh users are a special case. They care passionately about the Mac OS and would rewire their own bodies to run on Mac OS X if such a thing were possible. -- Peter H. Lewis -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003 * Ben Edwards +44 (0)117 968 2602 * * Critical Site Builderhttp://www.criticaldistribution.com * * online collaborative web authoring content management system * * Get alt news/views films online http://www.cultureshop.org * * i-Contact Progressive Video http://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol Indymedia http://bristol.indymedia.org * * Bristol's radical news http://www.bristle.org.uk * * PGP : F0CA 42B8 D56F 28AD 169B 49F3 3056 C6DB 8538 EEF8 * --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Why don't ISPs use v4
Anyone know why the two ISPs I use (www.pair.com, www.oneandone.co.uk) are still using V3 and don't have any timescales for upgrading? Ben * Ben Edwards +44 (0)117 968 2602 * * Critical Site Builderhttp://www.criticaldistribution.com * * online collaborative web authoring content management system * * Get alt news/views films online http://www.cultureshop.org * * i-Contact Progressive Video http://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol Indymedia http://bristol.indymedia.org * * Bristol's radical news http://www.bristle.org.uk * * PGP : F0CA 42B8 D56F 28AD 169B 49F3 3056 C6DB 8538 EEF8 * --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Free Text Search Min Word Length
Apparently V4 douse, its been out for over a year but for some reason ISP don't use it. ben At 10:29 31/03/2003 -0800, Adam Randall wrote: Well, as far as I know, your SOL =) MySQL does not support settings for full text indexing as of yet, so the only way that I know how to do it is to modify the config file. Adam. Content-Type: text/plain; x-avg-checked=avg-ok-396473B8; charset=us-ascii; format=flowed Content-Transfer-Encoding: 8bit Thanks, in the message you pointed me to set-variable = ft_min_word_len=3 (mysql defaults to 4) is what is required, but how do I do this from PHP (I am using shared hosting so don't have access to the MySQL config file). Ben At 18:56 30/03/2003 -0800, Adam Randall wrote: Could anyone please let me know how to set the min word lenght to 3 for Free Text search, I am using PHP. Ben Regards, Ben Check out this message: http://www.listsearch.com/mysql.lasso?id=287087 Adam. --- Adam Randall http://www.xaren.net/ [EMAIL PROTECTED] http://nt.xaren.net/ [EMAIL PROTECTED]AIM/iChat: blitz574 Macintosh users are a special case. They care passionately about the Mac OS and would rewire their own bodies to run on Mac OS X if such a thing were possible. -- Peter H. Lewis -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003 * Ben Edwards +44 (0)117 968 2602 * * Critical Site Builderhttp://www.criticaldistribution.com * * online collaborative web authoring content management system * * Get alt news/views films online http://www.cultureshop.org * * i-Contact Progressive Video http://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol Indymedia http://bristol.indymedia.org * * Bristol's radical news http://www.bristle.org.uk * * PGP : F0CA 42B8 D56F 28AD 169B 49F3 3056 C6DB 8538 EEF8 * Content-Type: text/plain; charset=us-ascii; x-avg=cert; x-avg-checked=avg-ok-396473B8 Content-Disposition: inline --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003 --- Adam Randall http://www.xaren.net/ [EMAIL PROTECTED] http://nt.xaren.net/ [EMAIL PROTECTED]AIM/iChat: blitz574 Macintosh users are a special case. They care passionately about the Mac OS and would rewire their own bodies to run on Mac OS X if such a thing were possible. -- Peter H. Lewis --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003 * Ben Edwards +44 (0)117 968 2602 * * Critical Site Builderhttp://www.criticaldistribution.com * * online collaborative web authoring content management system * * Get alt news/views films online http://www.cultureshop.org * * i-Contact Progressive Video http://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol Indymedia http://bristol.indymedia.org * * Bristol's radical news http://www.bristle.org.uk * * PGP : F0CA 42B8 D56F 28AD 169B 49F3 3056 C6DB 8538 EEF8 * --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Why don't ISPs use v4
Sorry everybody. I assumed that as it had been out for a long time (2 years?) it was stable. I should of chequed. Ben At 14:32 31/03/2003 -0500, Scott Helms wrote: Ben, I certainly can't speak for those organizations, but from our point of view MySQL v 4.x has just been declared stable. This means that its now time for us to run it internally for a few weeks and see if its going to cause any new problems over the existing 3.2.x series AND test the upgrade procedure since we aren't going to run double the number of database servers ;p This is quite a good bit of time and effort on the part of staffs that are already under a great deal of pressure to do more with less. Again not authoritative for those specific org's but these problems are close to universal in the space. Scott Helms On Mon, 2003-03-31 at 12:00, Ben Edwards wrote: Anyone know why the two ISPs I use (www.pair.com, www.oneandone.co.uk) are still using V3 and don't have any timescales for upgrading? Ben * Ben Edwards +44 (0)117 968 2602 * * Critical Site Builderhttp://www.criticaldistribution.com * * online collaborative web authoring content management system * * Get alt news/views films online http://www.cultureshop.org * * i-Contact Progressive Video http://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol Indymedia http://bristol.indymedia.org * * Bristol's radical news http://www.bristle.org.uk * * PGP : F0CA 42B8 D56F 28AD 169B 49F3 3056 C6DB 8538 EEF8 * --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- Scott Helms Director of Technology ZCorum, Inc (770) 888-8900 ext 2205 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003 * Ben Edwards +44 (0)117 968 2602 * * Critical Site Builderhttp://www.criticaldistribution.com * * online collaborative web authoring content management system * * Get alt news/views films online http://www.cultureshop.org * * i-Contact Progressive Video http://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol Indymedia http://bristol.indymedia.org * * Bristol's radical news http://www.bristle.org.uk * * PGP : F0CA 42B8 D56F 28AD 169B 49F3 3056 C6DB 8538 EEF8 * --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Free Text Search Min Word Length
Could anyone please let me know how to set the min word lenght to 3 for Free Text search, I am using PHP. Ben Regards, Ben * Ben Edwards +44 (0)117 968 2602 * * Critical Site Builderhttp://www.criticaldistribution.com * * online collaborative web authoring content management system * * Get alt news/views films online http://www.cultureshop.org * * i-Contact Progressive Video http://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol Indymedia http://bristol.indymedia.org * * Bristol's radical news http://www.bristle.org.uk * * PGP : F0CA 42B8 D56F 28AD 169B 49F3 3056 C6DB 8538 EEF8 * --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
sql where exists
having problems working out sql where exists syntax. Tried select * from sections s where exists ( select 0 from pages s where s.page = p.page ) Any ideas, Ben -- [EMAIL PROTECTED]+44 (0)7970 269 522 http://www.subvertise.org -- Altering the Corporate Image http://www.criticaldistribution.org -- Buy Alternative Video Online http://www.videonetwork.org -- Community/Radical Video http://www.spamcop.net/ -- Killing SPAM feels good! - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Error codes list
Get the pdf version from php.net. At 01:02 P 21/10/01, DL Neil wrote: Hi Maybe it is in the manual, but i can´t find it in the way i need. Does anybody know where to find a complet list of MySQL error codes with number and descripcion in order to make a library for handling and reporting alerts to users in php Hola Javier, Yes it is in the manual - but try the PHP manual (not MySQL's). The PHP online annotated manual is 'down' at the moment (update happening?) so I can't give you a reference - apologies. In addition to the familiar PHP-MySQL functions, eg mysql_query($sqlQuery, $dbLink) There are two more: mysql_errno() and mysql_error() which return an error number and error text (from the 'latest' MySQL function executed) - or zero and empty-string if the execution 'worked'. It's important to perform error-checking, but some would suggest that it should not be reported to users - under 'normal' circumstances!? Regards, =dn - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: fulltext not for me/alternatives
Is there a way to get mysql to change the default from 3 to 2 letter words (or less) that are ignored in fulltext indexes? I'm running version 4 alpha. I checked the TODO and it's not listed. Is it possible to make this a config.h option? As I said I am on a shared host and don't have the option to recompile MySQL. The answer is yes, it is in an .h file (or something like that). A minimum of 4 letters for a word to be included in a fulltext index seems a bit restrictive. My point exactly ;) But this is what it is (4 letters). Penelizes us non hardcore commercial users who can't afford our own box. The latest documentation categorically states there is no other way of changing this. ** * Ben Edwards+352 091 429995 * * Homepagehttp://www.gifford.co.uk/~bedwards * * i-Contact Progressive Videohttp://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol's radical newshttp://www.bristle.co.uk * * PGP : F0CA 42B8 D56F 28AD 169B 49F3 3056 C6DB 8538 EEF8 * ** - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
fulltext not for me/alternatives
I have a bit of a problem with using freetext indexes because there are a LOT of important 3 letter words in my database and as I am using shared hosting so do not have the option to recompile MySql. Can't quite figure why 3 is not the default (car, dog, cat war, man, bed, ). Maybe so you would have to recompile to be able to find s_e_x ;). The other thing I cant figure out is how much data you need for it to actually work well. There is a reference in the manual saying it works better on bigger data sets but no indication as to what it means by big. Anyway, this means I am looking for an alternative which can be implemented on php4. Has anyone any suggestions? Ben 3.23.41-log Also in the manual it mentions freetext search ** * Ben Edwards+352 091 429995 * * Homepagehttp://www.gifford.co.uk/~bedwards * * i-Contact Progressive Videohttp://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol's radical newshttp://www.bristle.co.uk * * PGP : F0CA 42B8 D56F 28AD 169B 49F3 3056 C6DB 8538 EEF8 * ** - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: fulltext not for me/alternatives
This is kind of nuts! list blocking stuff without a VERY narrow number of words in it. Doesn't even contain MySQL in the list ;) At 07:35 P 21/10/01, you wrote: 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: database,sql,query,table See the manual, and SHOW VARIABLES LIKE 'ft_%' Looks like this is something new to 4. My ISP has 20+ db servers so reckon it will be a while before they roll 4 out. Will email them. Thanks for the info. However this douse not help me in the immediate future and I still need to find a alternative fullsearch method. Ben ** * Ben Edwards+352 091 429995 * * Homepagehttp://www.gifford.co.uk/~bedwards * * i-Contact Progressive Videohttp://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol's radical newshttp://www.bristle.co.uk * * PGP : F0CA 42B8 D56F 28AD 169B 49F3 3056 C6DB 8538 EEF8 * ** - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 and PHP problem
Had a fully working installation of MySQL 3.23 with PHP 6.0.6. I then foolishly installed PGP which included PGPNet and I cant access my MySQL database from PHP. When I try to connect I get error '', another strange thing is under MyODBC it says 'Not Found'. I have re-installed both PHP and MySQL (actually installed 3.23.42) after first de-installing PHP but still no luck. Regards, Ben -- This Email account is protected by http://www.spamcop.net ALL spam is reported to ISP and there network provider *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+ * Ben Edwards [EMAIL PROTECTED] +352 091 429995 * * Homepagehttp://www.gifford.co.uk/~bedwards * * i-Contact Progressive Videohttp://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol's radical newshttp://www.bristle.co.uk * * Open Directory Project http://www.dmoz.org * *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 and PHP problem
[Reposting cos left error message out, sorry] Had a fully working installation of MySQL 3.23 with PHP 6.0.6. I then foolishly installed PGP which included PGPNet and I cant access my MySQL database from PHP. When I try to connect I get error 'Access denied for user: '@GREEN' to database 'subvert_cd' ', another strange thing is under MyODBC it says 'Not Found'. I have re-installed both PHP and MySQL (actually installed 3.23.42) after first de-installing PHP but still no luck. Regards, Ben -- This Email account is protected by http://www.spamcop.net ALL spam is reported to ISP and there network provider *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+ * Ben Edwards [EMAIL PROTECTED] +352 091 429995 * * Homepagehttp://www.gifford.co.uk/~bedwards * * i-Contact Progressive Videohttp://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol's radical newshttp://www.bristle.co.uk * * Open Directory Project http://www.dmoz.org * *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php