Re: count(*) send a wrong value

2006-01-24 Thread fabsk
Hi, Thank you a lot for your answer. I checked very carefully. The structure of the table is (exported by phpMyAdmin): CREATE TABLE `tp_participation` ( `uid` int(11) NOT NULL default '0', `challenge_id` int(11) NOT NULL default '0', `response` text collate latin1_general_ci NOT NULL,

Re: count(*) send a wrong value

2006-01-24 Thread Martijn Tonies
Thank you a lot for your answer. I checked very carefully. The structure of the table is (exported by phpMyAdmin): CREATE TABLE `tp_participation` ( `uid` int(11) NOT NULL default '0', `challenge_id` int(11) NOT NULL default '0', `response` text collate latin1_general_ci NOT NULL,

Google Against its Mission (Google Pack restriction for Iran!)

2006-01-24 Thread Abaghan Ghahraman
گوگل بر خلاف بیانیه ماموریت http://www.google.com/corporate/index.html خود سرویس گوگل پک را برای ایرانیان مسدود کرد. Google's mission is NOT to organize the world's information and make it universally accessible and useful anymore . http://pack.google.com

Re: Dump only data and Database

2006-01-24 Thread Harald Fuchs
In article [EMAIL PROTECTED], Paul DuBois [EMAIL PROTECTED] writes: At 18:59 -0200 1/23/06, Luiz Rafael Culik Guimaraes wrote: Dear Friends What are the best options to dump an entire database on linux (with creation of databases and tables) with out dumping the index creation sentences

Storing a string value with slash(\)

2006-01-24 Thread lakshmi.narasimharao
Hi, From the front end I need to use double slashes i.e (\\) to enter one slash (\) into the MySQL database. I.e, if I enter Gelb\Paha, it stores in the mySQL as GlebPaha, If I enter S\\Greeen, it stores as S\Green in the database. Is there any way in MySQL so that I can enter any

Update query

2006-01-24 Thread Jørn Dahl-Stamnes
Assume that you have two tables (in two different databases): table A in database dbA: id CHAR(6) foo int bar int table B in database dbB: id INT(6) foo int bar int Both tables has a several records with identical ID

Re: Database backups

2006-01-24 Thread Gleb Paharenko
Hello. Have a look here: http://dev.mysql.com/doc/refman/5.0/en/backing-up.html George Law wrote: Just a quick question regarding mysql backups. I know myisam tables are portal from machine to machine, but I know there are some differences Between innodb tables. I am running mysql

Re: Troubles installing MySQL5 via Darwin Ports

2006-01-24 Thread Gleb Paharenko
Hello. /opt/local/share/mysql5/mysql/mysql.server: line 234: cd: /opt/ local/libexec/mysqld: No such file or directory . • First of all, I check to see if 'mysqld' existed in /opt/local/ libexec/ and it does, so I don't know why it can't find it. Any

Re: How can I isolate the integer part of a varchar field and use it in an ORDER BY?

2006-01-24 Thread Gleb Paharenko
Hello. The brute force way is to create and UDF or store function which can extract the numeric part from the string and ORDER BY the results of this function. See: http://dev.mysql.com/doc/refman/5.0/en/adding-functions.html http://dev.mysql.com/doc/refman/5.0/en/stored-procedures.html

Re: MySQL 4.1 and PHP 4.4

2006-01-24 Thread Gleb Paharenko
Hello. From my experience PHP 4.4 works fine with MySQL 4.1. What troubles are you getting while restoring utf8 database to the server? Please, could you explain more in detail all steps of the restoring process. Include information about database character set as well. 立 周 wrote: Dear list

Re: Storing a string value with slash(\)

2006-01-24 Thread Gleb Paharenko
Hello. If I retrive the same value with the slash (\), not able to display properly in the GUI. Do we need to use any MySQL specific functions to select such values?. If you're retrieving the same values which have stored, that this is rather a GUI problem, not MySQL. Is there any way in

Re: Update query

2006-01-24 Thread Gleb Paharenko
Hello. If dbA.id has the format you have specified MySQL should be able to silently convert the type from char to int, and you can work with dbA.id as it is integer column. mysql create table ch(id char(6)); Query OK, 0 rows affected (0.04 sec) mysql insert into ch set id='001234'; Query OK, 1

Re: Update query

2006-01-24 Thread Jørn Dahl-Stamnes
On Tuesday 24 January 2006 12:03, Gleb Paharenko wrote: Hello. If dbA.id has the format you have specified MySQL should be able to silently convert the type from char to int, and you can work with dbA.id as it is integer column. mysql create table ch(id char(6)); Query OK, 0 rows affected

RE: How can I isolate the integer part of a varchar field and use it in an ORDER BY?

2006-01-24 Thread Nicolas Verhaeghe
Oh yeah, I forgot to tell... I still use 3.23. Cannot upgrade for the moment. So no SP... Is this possible at all with 3.23? Thanks for your help! -Original Message- From: Gleb Paharenko [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 24, 2006 3:41 AM To: mysql@lists.mysql.com

Re: Troubles installing MySQL5 via Darwin Ports

2006-01-24 Thread Philip Thompson
On Jan 24, 2006, at 5:13 AM, James Harvard wrote: Is there a reason why you're using Darwin Ports and not the installer that MySQL offers? James Harvard Yes. I tried the installer multiple times and it would not work. I got so fed up with it that I decided to give DP a chance. So far,

RE: How can I isolate the integer part of a varchar field and use it in an ORDER BY?

2006-01-24 Thread George Law
Nicolas, Not sure when the replace function was introduced into mysql, but I think it might do... Use replace in your order by, replacing a-z with null chars, leaving just your numeric digits, then order by select * from test; +-+---+ | uid | name | +-+---+ | 1

Truncated Incorrect Double Value

2006-01-24 Thread Jesse
I am trying to create a query that will include HTML code for a link for a datagrid that I've got. However, I'm getting the error, Truncated incorrect DOUBLE value when I execute the following query: SELECT *, 'a href=CamperSelItems.aspx?ID=' + CAST(ID AS Char) + 'Select Items/a' AS

Re: Truncated Incorrect Double Value

2006-01-24 Thread Jesse
Never mind, I've found that if I use CONCAT(), it works just fine. It's hard for me to get used to using CONCAT instead of just using the +. I've made this mistake several times. Thanks, Jesse - Original Message - From: Jesse [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent:

回复: Re: MySQL 4.1 and PHP 4.4

2006-01-24 Thread 立 周
--- Gleb Paharenko [EMAIL PROTECTED]写道: Hello. From my experience PHP 4.4 works fine with MySQL 4.1. What troubles are you getting while restoring utf8 database to the server? Please, could you explain more in detail all steps of the restoring process. Include information about

RE: How can I isolate the integer part of a varchar field and use it in an ORDER BY?

2006-01-24 Thread Nicolas Verhaeghe
Thanks, but unfortunately the replace function does not want to work on a regexp in version 3.23... I guess I'll have to create a displacement field and populate it from the admin tool. Thanks for your help. I will upgrade this server as soon as I can. -Original Message- From: George

Re: Troubles installing MySQL5 via Darwin Ports

2006-01-24 Thread James Harvard
I would think this list is more likely to be able to assist with problems using the standard installer from MySQL than with some third party installer / package management system. I would suggest using Disk Utility to repair permissions on your hard disc (just in case some relevant directory

RE: How can I isolate the integer part of a varchar field and use it in an ORDER BY?

2006-01-24 Thread George Law
Nicolas, What about just doing your sorting within your code instead of with mysql? Depending on how many rows you have that you would need to sort, it should not be too difficult to build a multidimensional array (add 2 columns, one with the alphabetical part of your key below, the other with

Query: Order for the Earliest Latest date

2006-01-24 Thread Dan Baker
[GENERAL INFO] I have two tables I'm working with. One table (Sites) contains contact information for every customer site that we deal with. The other table (Incidents) contains all the support calls we've made. [QUERY] I'm trying to generate a list of sites that HAD a support incident within

Error 2016 and 2013

2006-01-24 Thread David Godsey
nativecode=2013 ** Lost connection to MySQL server during query I think 2016 is Lost database connection What I am doing is I have a PHP class object that calls a stored procedure. I don't think I'm hitting any timeouts because it happens in less than a second. So here is my stored procedure:

Re: count(*) send a wrong value

2006-01-24 Thread fabsk
Le mardi 24 janvier 2006 à 09:19 +0100, Martijn Tonies a écrit : CREATE TABLE `tp_participation` ( `uid` int(11) NOT NULL default '0', `challenge_id` int(11) NOT NULL default '0', `response` text collate latin1_general_ci NOT NULL, `points` int(11) default NULL, UNIQUE KEY

Re: count(*) send a wrong value

2006-01-24 Thread Fabien SK
Le mardi 24 janvier 2006 à 19:08 +0100, fabsk a écrit : Thank you a lot for your answer. The bug is there: if I drop the index 'tp_idx_part_solution', the result of the count is OK. I recreated this index and the cound drop to 2 again. It doesn't happen on version 4.1.12-Max on my machine

Re: count(*) send a wrong value

2006-01-24 Thread Fabien SK
Le mardi 24 janvier 2006 à 19:23 +0100, Fabien SK a écrit : Le mardi 24 janvier 2006 à 19:08 +0100, fabsk a écrit : Thank you a lot for your answer. The bug is there: if I drop the index 'tp_idx_part_solution', the result of the count is OK. I recreated this index and the cound drop to 2

Query Help

2006-01-24 Thread Ian Barnes
Hi, This is my current query which works in mysql 4, but not in 5. Its from mambo, but im trying to modify it because they don't officially support mysql5 yet. The original query: SELECT c.*, g.name AS groupname, cc.name, u.name AS editor, f.content_id AS frontpage, s.title AS section_name,

Re: Query: Order for the Earliest Latest date

2006-01-24 Thread Greg Fortune
In addition to the id_Site, you also need to grab the MAX(Time) so you have something to sort by. This requires a little trick known as a groupwise maximum. See http://dev.mysql.com/doc/mysql/en/example-Maximum-column-group-row.html for an explanation and some examples. Greg Fortune On

Re: Query Help

2006-01-24 Thread gerald_clark
Ian Barnes wrote: Hi, This is my current query which works in mysql 4, but not in 5. Its from mambo, but im trying to modify it because they don't officially support mysql5 yet. The original query: SELECT c.*, g.name AS groupname, cc.name, u.name AS editor, f.content_id AS frontpage, s.title

mysql 5.0.18: Bind on unix socket: Permission denied

2006-01-24 Thread Nathan Gross
Yesterday I installed the XAMPP (used to be called LAMP) stack, which includes mysql 5.0.18, on a Fedora Core 4 system. This seems like the quickest way of getting version 5 running WITHOUT clashing at all with my current install. Everything went 100% smooth, and I was able to copy my 4.x myisam

RE: Query Help

2006-01-24 Thread Ian Barnes
Hi, It now looks like this and still doesn't work, complains about exactly the same thing. SELECT c.*, g.name AS groupname, cc.name, u.name AS editor, f.content_id AS frontpage, s.title AS section_name, v.name AS author FROM mos_content c, mos_categories cc, mos_sections s INNER JOIN mos_groups

Re: UK Postcodes

2006-01-24 Thread sheeri kritzer
Hi Mike, Sorry for the late reply. The company I work for has this very same problem -- we are a multi-national personal ad site, where members can search for other members close to them. The answer is, unfortunately, you have to acquire one database with postcodes, and another with longitudes

RE: Query Help

2006-01-24 Thread SGreen
That's because you are still using comma joins! ... FROM mos_content c, one comma mos_categories cc, mos_sections s INNER JOIN mos_groups g ON (g.id = ^--- another comma c.access) INNER JOIN mos_users u ON (u.id = c.checked_out) INNER JOIN mos_users v ON (v.id =

Re: UK Postcodes

2006-01-24 Thread Rhino
You'd think that the people who run the post office in the UK - British Telecom?? - would have had a number of enquiries from people who wanted to match postal codes with latitude and longitude. That would tend to give them a natural incentive to provide such information, all nicely integrated,

Longest substring match

2006-01-24 Thread George Law
Hi All, I am working with some call processing. I have one table with call detail records (cdrs) with a phone number in it : 0111234567890 I have another table with rates in it based on the dial number with the 011 stripped off. There may be unique rates for 1234 1235 1236

Lost connection to MySQL server during query

2006-01-24 Thread David Godsey
I am getting this error when connecting to mysql with PHP: Lost connection to MySQL server during query This happens only when I use this procedure, but it doesn't necessarily fail when this procedure is called. The error will happen frequently, however it is not consistent. This is my first

RE: Lost connection to MySQL server during query

2006-01-24 Thread George Law
David, Are you using persistent connections? Sounds like perhaps a persistent connection is timing out. Maybe a quick work around would be to call a check status routine (ie - do a show status), just to see if the connection is still there. If this fails, just do a mysql_connect... Before

Re: UK Postcodes

2006-01-24 Thread James Harvard
It's the Royal Mail. Ordnance Survey, the government mapping agency for the UK, are in on it too. To read their web site (as I have done a couple of years ago, and just now too) you would think it had never occurred to them that people might want to deploy the data as part of a web site. It's

Re: Query Help

2006-01-24 Thread Peter Brawley
Ian, It now looks like this and still doesn't work, complains about exactly the same thing. SELECT c.*, g.name AS groupname, cc.name, u.name AS editor, f.content_id AS frontpage, s.title AS section_name, v.name AS author FROM mos_content c, mos_categories cc, mos_sections s INNER JOIN

Re: key_buffer_size vs innodb_buffer_pool_size

2006-01-24 Thread sheeri kritzer
innodb_buffer_pool_size + key_buffer_size + max_connections*(sort_buffer_size + read_buffer_size + binlog_cache_size) + max_connections*2MB is what I was told recently on this list. -Sheeri Kritzer On 1/16/06, Grant Giddens [EMAIL PROTECTED] wrote: I don't know if I still fully understand.

RE: Lost connection to MySQL server during query

2006-01-24 Thread David Godsey
Thanks for the reply. I'm not using persistend connections though. It appears that it looses the connection in the middle of the query or in other words, before the procedure returns. So that means I not getting the data I need. So for debug purposes, are you saying to do a check status from

Re: Query: Order for the Earliest Latest date

2006-01-24 Thread Peter Brawley
Dan, I'm trying to generate a list of sites that HAD a support incident within a known date range, and order them so that the site that has the OLDEST support call is FIRST in the list. It's the (oft-asked-for) groupwise-max query. Here's one way, assuming you have MySQL 4.1 or later ...

Re: Lost connection to MySQL server during query

2006-01-24 Thread Jonathan Mangin
I got exactly that error message last night when doing a numeric comparison on a varchar column. Oops. Kind of misleading, though. - Original Message - From: David Godsey [EMAIL PROTECTED] To: George Law [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Sent: Tuesday, January 24, 2006 4:43

Re: Query: Order for the Earliest Latest date

2006-01-24 Thread Dan Baker
Peter Brawley [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Dan, I'm trying to generate a list of sites that HAD a support incident within a known date range, and order them so that the site that has the OLDEST support call is FIRST in the list. It's the (oft-asked-for)

Re: How can I isolate the integer part of a varchar field and use it in an ORDER BY?

2006-01-24 Thread Michael Stassen
George Law wrote: Nicolas, Not sure when the replace function was introduced into mysql, but I think it might do... REPLACE() exists in 3.23. Use replace in your order by, replacing a-z with null chars, leaving just your numeric digits, then order by Easier said than done. select *

RE: How can I isolate the integer part of a varchar field and use it in an ORDER BY?

2006-01-24 Thread Nicolas Verhaeghe
Because I am currently stuck with 3.23 I have just decided to create a displacement field to isolate the number. Besides, some of these bikes escape from the rules, for instance instead of 600 for 600cc, you only have a mere 6, 1 stands for 1000. So all in all the displacement fields will work

Re: How can I isolate the integer part of a varchar field and use it in an ORDER BY?

2006-01-24 Thread Michael Stassen
Nicolas Verhaeghe wrote: Thanks, but unfortunately the replace function does not want to work on a regexp in version 3.23... or 4.0, or 4.1, or ... I guess I'll have to create a displacement field and populate it from the admin tool. Well, that's the right way to go. You're seeing the

Re: How can I isolate the integer part of a varchar field and use it in an ORDER BY?

2006-01-24 Thread Michael Stassen
Nicolas Verhaeghe wrote: Because I am currently stuck with 3.23 I have just decided to create a displacement field to isolate the number. That's the right way to go, regardless of version. Besides, some of these bikes escape from the rules, for instance instead of 600 for 600cc, you only

RE: How can I isolate the integer part of a varchar field and use it in an ORDER BY?

2006-01-24 Thread Nicolas Verhaeghe
You're very helpful, thanks. Problem already taken care of but thanks for the lesson. -Original Message- From: Michael Stassen [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 24, 2006 10:55 PM To: Nicolas Verhaeghe Cc: mysql@lists.mysql.com Subject: Re: How can I isolate the integer