<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>MySQL Forums</title>
        <description></description>
        <link>http://forums.mysql.com/index.php</link>
        <lastBuildDate>Sat, 04 Jul 2009 01:59:55 +0000</lastBuildDate>
        <generator>Phorum 5.2.1-alpha</generator>
        <item>
            <guid>http://forums.mysql.com/read.php?10,270159,270159#msg-270159</guid>
            <title>Isn't localhost included in '%'? (no replies)</title>
            <link>http://forums.mysql.com/read.php?10,270159,270159#msg-270159</link>
            <description><![CDATA[ When I make a user named whoever@localhost, I can connect just fine.  When I make a user named whoever@%, and try to connect it doesn't work.  For instance, &quot;mysql -uwhoever -pwhatever&quot; gets the response &quot;ERROR 1045 (28000): Access denied for user 'whoever'@'localhost' (using password: YES)&quot;.<br />
<br />
Shouldn't this work?<br />
<br />
Thanks in advance for any help with this.]]></description>
            <dc:creator>Jerry Fiddler</dc:creator>
            <category>Newbie</category>
            <pubDate>Sat, 04 Jul 2009 00:51:43 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?102,270158,270158#msg-270158</guid>
            <title>Declare cursor -&amp;gt; error 1064(42000) (no replies)</title>
            <link>http://forums.mysql.com/read.php?102,270158,270158#msg-270158</link>
            <description><![CDATA[ Ok, I'm converting a procedure I wrote for oracle into MySql. I can't even declare the cursor though. I've even looked at many MySql syntax pages and dont see what I'm doing wrong.<br />
<br />
DECLARE cur_1 CURSOR FOR SELECT * FROM transaction;<br />
<br />
and they I get the error code...<br />
<br />
what am I doing wrong?<br />
<br />
Thank you]]></description>
            <dc:creator>J R</dc:creator>
            <category>Cursors</category>
            <pubDate>Sat, 04 Jul 2009 00:42:56 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?72,270157,270157#msg-270157</guid>
            <title>Relacionamento (no replies)</title>
            <link>http://forums.mysql.com/read.php?72,270157,270157#msg-270157</link>
            <description><![CDATA[ ALguem saberia informar se a forma de elaborar um relacionamento entre tabelas no MySQL é a mesma maneira que se faz no MS Access?<br />
<br />
Obrigado<br />
Ricardo]]></description>
            <dc:creator>Ricardo Groiso</dc:creator>
            <category>Portuguese</category>
            <pubDate>Sat, 04 Jul 2009 00:05:27 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?52,270156,270156#msg-270156</guid>
            <title>NEED HELP: cannot mysql table 1 to php form to table 2 (no replies)</title>
            <link>http://forums.mysql.com/read.php?52,270156,270156#msg-270156</link>
            <description><![CDATA[ I am new to this forum and am hoping to find some help about a problem i can't figure out at all &quot;I hope this is the right forum for my problem&quot;.. Thanks a bunch in advance..<br />
<br />
here's my problem i am a sort of a beginner in php...<br />
<br />
i have a table in database on my local machine which i am using to develop an app...<br />
<br />
i want to take the names of employees from (TABLE1) and bring into a new (PHP/HTML FORM 'DROP DOWN LIST') I've got that working Sortof, Now i need to use the (NAMES) from the DROP DOWN LIST and submit them via form and have the names show up in new table... here the code snippet i am using...<br />
&lt;form name=&quot;form&quot; method=&quot;post&quot; action=&quot;load_process.php&quot; name=&quot;form&quot;&gt;<br />
//////NON PHP FORM FIELDS//////<br />
<br />
.........<br />
<br />
///////PHP FORM FIELD//////<br />
<br />
&lt;?php <br />
$con=mysql_connect(&quot;host&quot;,&quot;user&quot;,&quot;pass&quot;);<br />
if (!$con)<br />
{<br />
	echo (&quot;ERROR&quot;);<br />
}<br />
MYSQL_SELECT_DB(&quot;dispatch&quot;,$con);<br />
echo &quot;&lt;select name='driver'&gt;\r\n&quot;;<br />
	 $drvrs=mysql_query(&quot;SELECT first FROM employees ORDER BY first &quot;);<br />
	 while($results=mysql_fetch_assoc($drvrs)){<br />
	 	foreach($results as $key =&gt; $value){<br />
	 	<br />
	 		echo&quot;&lt;option value=$key &gt;&quot;.htmlentities($value).&quot;\r\n&quot;;<br />
	 		<br />
	 	}<br />
		 <br />
	 }<br />
	 	echo&quot;&lt;/select&gt;&lt;/td&gt;\r\n&quot;<br />
      ?&gt;<br />
<br />
//////END PHP FORM FIELD/////<br />
/////HTML FORM FILEDS RESUME/////<br />
&lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;save&quot;/&gt;<br />
<br />
&lt;/form&gt;<br />
<br />
I am seeing the name in the drop down list but when i submit it my database table shows BLANK for the &quot;first&quot; NAME...PLEASE HELP<br />
<br />
THANKS IN ADVANCE]]></description>
            <dc:creator>Jay Singh</dc:creator>
            <category>PHP</category>
            <pubDate>Sat, 04 Jul 2009 00:01:14 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?167,270155,270155#msg-270155</guid>
            <title>MySQL Connector C++ Example - Windows cl.exe (Microsoft Visual Studio C++ 2008 ) (no replies)</title>
            <link>http://forums.mysql.com/read.php?167,270155,270155#msg-270155</link>
            <description><![CDATA[ MySQL Connector C++ Example - Windows cl.exe (Microsoft Visual Studio C++ 2008) <br />
<a rel="nofollow"  href="http://codediaries.blogspot.com/2009/07/mysql-connector-c-example-windows-clexe.html">http://codediaries.blogspot.com/2009/07/mysql-connector-c-example-windows-clexe.html</a>]]></description>
            <dc:creator>Edwin DeSouza</dc:creator>
            <category>MySQL Connector/C++</category>
            <pubDate>Fri, 03 Jul 2009 23:12:58 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?11,270152,270152#msg-270152</guid>
            <title>Installation hangs (no replies)</title>
            <link>http://forums.mysql.com/read.php?11,270152,270152#msg-270152</link>
            <description><![CDATA[ I have a problem with the final step of the MySQL Server Instance Configuration Wizard.  It never seems to get to the check off part of Apply Security Settings.<br />
<br />
<img src="http://i67.photobucket.com/albums/h292/Athono/hung.jpg" class="bbcode" alt="http://i67.photobucket.com/albums/h292/Athono/hung.jpg" />]]></description>
            <dc:creator>Bill Thompson</dc:creator>
            <category>Install</category>
            <pubDate>Fri, 03 Jul 2009 22:50:13 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?10,270152,270153#msg-270153</guid>
            <title>Installation hangs (-1 replies)</title>
            <link>http://forums.mysql.com/read.php?10,270152,270153#msg-270153</link>
            <description><![CDATA[  -- moved topic -- ]]></description>
            <dc:creator>Bill Thompson</dc:creator>
            <category>Newbie</category>
            <pubDate>Fri, 03 Jul 2009 22:50:13 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?10,270151,270151#msg-270151</guid>
            <title>fast and slow restore (no replies)</title>
            <link>http://forums.mysql.com/read.php?10,270151,270151#msg-270151</link>
            <description><![CDATA[ Hello everybody, <br />
<br />
First, sorry my poor english, and i hope you can understand what i said. <br />
<br />
I use mysql on a lot of OS but i dont understand something. <br />
I am sure that somebody can explain me. <br />
<br />
I usually use putty to connect to sun solaris 9, on good mainframe computer E6900 ( sun ) <br />
<br />
I dump 5 databases, using mysqladministrator or mysqldump. <br />
<br />
Databases are very differents, one take 50 MO and other take 400-500 MO. <br />
<br />
i used mysql &lt; /my_database.sql after a dump to restore data. <br />
<br />
My problem is that : <br />
If i dump all databases in one file, i take 2 GO file and when i import it, it take a long time to restore data. <br />
<br />
If i dump all databases in multiple files ( one databases per file ), and when i connect multiple putty to solaris, when i import it ( one database by session ) it take less time than the first import. <br />
<br />
When i look with mysqladministrator, a &quot;show processlist&quot;, the first solution import one insert per one insert. <br />
The second solution, the show processlist list me 5 insert by 5 insert. <br />
<br />
So, i hope that it is possible to insert like the second time but using only one putty connection. I don t know how to do that... any one got an idea ? <br />
<br />
<br />
But i have another question. If it is possible to do multiple insert with multiple putty connection for multi databases, Is it possible to &quot;cut&quot; one database in multiple insert, something like tables by tables ? <br />
<br />
My only request is too be faster to restore data in databases with innodb. <br />
<br />
Thank u very much for helping me. <br />
<br />
If u don t understand what i mean, tell me and i will try to write better english.]]></description>
            <dc:creator>benoit seize</dc:creator>
            <category>Newbie</category>
            <pubDate>Fri, 03 Jul 2009 21:54:09 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?22,270150,270150#msg-270150</guid>
            <title>slow and fast insert... from newbie (no replies)</title>
            <link>http://forums.mysql.com/read.php?22,270150,270150#msg-270150</link>
            <description><![CDATA[ Hello everybody,<br />
<br />
First, sorry my poor english, and i hope you can understand what i said.<br />
<br />
I use mysql on a lot of OS but i dont understand something.<br />
I am sure that somebody can explain me.<br />
<br />
I usually use putty to connect to sun solaris 9, on good mainframe computer E6900 ( sun )<br />
<br />
I dump 5 databases, using mysqladministrator or mysqldump.<br />
<br />
Databases are very differents, one take 50 MO and other take 400-500 MO.<br />
<br />
i used mysql &lt; /my_database.sql after a dump to restore data.<br />
<br />
My problem is that :<br />
If i dump all databases in one file, i take 2 GO file and when i import it, it take a long time to restore data.<br />
<br />
If i dump all databases in multiple files ( one databases per file ), and when i connect multiple putty to solaris, when i import it ( one database by session ) it take less time than the first import.<br />
<br />
When i look with mysqladministrator, a &quot;show processlist&quot;, the first solution import one insert per one insert.<br />
The second solution, the show processlist list me 5 insert by 5 insert.<br />
<br />
So, i hope that it is possible to insert like the second time but using only one putty connection. I don t know how to do that... any one got an idea ?<br />
<br />
<br />
But i have another question. If it is possible to do multiple insert with multiple putty connection for multi databases, Is it possible to &quot;cut&quot; one database in multiple insert, something like tables by tables ?<br />
<br />
My only request is too be faster to restore data in databases with innodb.<br />
<br />
Thank u very much for helping me.<br />
<br />
If u don t understand what i mean, tell me and i will try to write better english.]]></description>
            <dc:creator>benoit seize</dc:creator>
            <category>InnoDB</category>
            <pubDate>Fri, 03 Jul 2009 21:49:02 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,270145,270145#msg-270145</guid>
            <title>MySQL Server 5.4/include/mysql_com.h:243: error: `SOCKET' does not name a type (no replies)</title>
            <link>http://forums.mysql.com/read.php?45,270145,270145#msg-270145</link>
            <description><![CDATA[ Hello All,<br />
<br />
<br />
My very simple code tries to integrate C++ code (win32 plataform) with MySQL libraries (version 5.4, and also v5.1 tested with the same error/behave).<br />
<br />
THE CODE: -------------------------<br />
<br />
#include &lt;iostream&gt;<br />
#include &lt;mysql.h&gt;<br />
using namespace std;<br />
MYSQL *connection, mysql;<br />
MYSQL_RES *result;<br />
MYSQL_ROW row;<br />
int query_state;<br />
int main() {<br />
return 0;<br />
}<br />
<br />
------------------------------------<br />
<br />
Here are the search directories path set for the compiler (Code::Blocks v 8.02).<br />
<br />
C:\Arquivos de programas\MySQL\MySQL Server 5.4\include<br />
C:\Arquivos de programas\MySQL\MySQL Server 5.4\lib\opt<br />
<br />
------------------------------------<br />
<br />
Upon trying to BUILD the very simple C++ code above... I got error as shown below:<br />
<br />
Compiling: C:\app-cpp\aa1\002.cpp<br />
In file included from C:/Arquivos de programas/MySQL/MySQL Server 5.4/include/mysql.h:71,<br />
                 from C:\app-cpp\aa1\002.cpp:2:<br />
C:/Arquivos de programas/MySQL/MySQL Server 5.4/include/mysql_com.h:243: error: `SOCKET' does not name a type<br />
C:/Arquivos de programas/MySQL/MySQL Server 5.4/include/mysql_com.h:417: error: `SOCKET' was not declared in this scope<br />
C:/Arquivos de programas/MySQL/MySQL Server 5.4/include/mysql_com.h:417: error: expected primary-expression before &quot;const&quot;<br />
C:/Arquivos de programas/MySQL/MySQL Server 5.4/include/mysql_com.h:417: error: expected primary-expression before &quot;unsigned&quot;<br />
C:/Arquivos de programas/MySQL/MySQL Server 5.4/include/mysql_com.h:418: error: expected primary-expression before &quot;unsigned&quot;<br />
C:/Arquivos de programas/MySQL/MySQL Server 5.4/include/mysql_com.h:418: error: initializer expression list treated as compound expression<br />
Process terminated with status 1 (0 minutes, 1 seconds)<br />
6 errors, 0 warnings<br />
<br />
<br />
======================================<br />
<br />
<br />
Does anybody may help me to over this error?<br />
<br />
Thanks in advance,<br />
<br />
<br />
<br />
mson77]]></description>
            <dc:creator>Min Son</dc:creator>
            <category>C/C++</category>
            <pubDate>Fri, 03 Jul 2009 20:43:04 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?22,270140,270140#msg-270140</guid>
            <title>Error 1005: Can't create table (errno 168) (no replies)</title>
            <link>http://forums.mysql.com/read.php?22,270140,270140#msg-270140</link>
            <description><![CDATA[ Hello,<br />
<br />
I am trying to convert MyIsam tables into Innodb using following query:<br />
<br />
ALTER TABLE `myDb`.`myTable` ENGINE=InnoDB<br />
<br />
And I get &quot;Error 1005: Can't create table (errno 168)&quot; and could not find out why is doing this.<br />
<br />
In my.ini I uncommented &quot;innodb_file_per_table&quot; because I want to have the data stored in same location as the tables (.frm) (which are not in the default /data/ directory)<br />
<br />
Can someone give me a hand on this?<br />
<br />
Thanks]]></description>
            <dc:creator>Jon Zang</dc:creator>
            <category>InnoDB</category>
            <pubDate>Fri, 03 Jul 2009 20:00:29 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?10,270138,270138#msg-270138</guid>
            <title>items disappear with LEFT JOIN (1 reply)</title>
            <link>http://forums.mysql.com/read.php?10,270138,270138#msg-270138</link>
            <description><![CDATA[ I've done a query<br />
<br />
   SELECT * FROM table1<br />
<br />
which turns out some results.  Now I have added a LEFT JOIN to the query:<br />
<br />
   SELECT * FROM table1 LEFT JOIN table2 ON table1.someVar = table2.somVar<br />
<br />
but suddenly all the elements that don't appear in the table 2 disappear.  What's going wrong?  Shouldn't the second query always turn out at least as many items as the first query?]]></description>
            <dc:creator>michael nieuwenhuizen</dc:creator>
            <category>Newbie</category>
            <pubDate>Fri, 03 Jul 2009 23:07:56 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?38,270136,270136#msg-270136</guid>
            <title>Time out after 30 Second (no replies)</title>
            <link>http://forums.mysql.com/read.php?38,270136,270136#msg-270136</link>
            <description><![CDATA[ i develop program using C#.net and mysql server <br />
my program give error message &quot; Fatal Error &quot; , i update mysql server to increate time out but no use , also i update my connection string but still the connection timeout after 30 second]]></description>
            <dc:creator>hoor swelim</dc:creator>
            <category>.NET</category>
            <pubDate>Fri, 03 Jul 2009 18:55:45 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?24,270135,270135#msg-270135</guid>
            <title>Query not using index in ORDER BY (no replies)</title>
            <link>http://forums.mysql.com/read.php?24,270135,270135#msg-270135</link>
            <description><![CDATA[ Hi, I'm having trouble with this query, it's taking aprox 13 seconds which is too long for a pager in a list, the application that builds this query is a SugarCRM, so if the solution is to add an index it would be great for me, I don't have so much freedom to modify the structure of the query. The biggest tables here are contacts and contacts_cstm with 40000 records. <br />
<br />
Here is the tables schema and the problematic query:<br />
<br />
<br />
TABLES SCHEMA:<br />
<br />
<br />
CREATE TABLE `contacts` (<br />
  `id` char(36) NOT NULL,<br />
  `date_entered` datetime DEFAULT NULL,<br />
  `date_modified` datetime DEFAULT NULL,<br />
  `modified_user_id` char(36) DEFAULT NULL,<br />
  `created_by` char(36) DEFAULT NULL,<br />
  `description` text,<br />
  `deleted` tinyint(1) DEFAULT '0',<br />
  `assigned_user_id` char(36) DEFAULT NULL,<br />
  `salutation` varchar(5) DEFAULT NULL,<br />
  `first_name` varchar(100) DEFAULT NULL,<br />
  `last_name` varchar(100) DEFAULT NULL,<br />
  `title` varchar(100) DEFAULT NULL,<br />
  `department` varchar(255) DEFAULT NULL,<br />
  `do_not_call` tinyint(1) DEFAULT '0',<br />
  `phone_home` varchar(25) DEFAULT NULL,<br />
  `phone_mobile` varchar(25) DEFAULT NULL,<br />
  `phone_work` varchar(25) DEFAULT NULL,<br />
  `phone_other` varchar(25) DEFAULT NULL,<br />
  `phone_fax` varchar(25) DEFAULT NULL,<br />
  `primary_address_street` varchar(150) DEFAULT NULL,<br />
  `primary_address_city` varchar(100) DEFAULT NULL,<br />
  `primary_address_state` varchar(100) DEFAULT NULL,<br />
  `primary_address_postalcode` varchar(20) DEFAULT NULL,<br />
  `primary_address_country` varchar(255) DEFAULT NULL,<br />
  `alt_address_street` varchar(150) DEFAULT NULL,<br />
  `alt_address_city` varchar(100) DEFAULT NULL,<br />
  `alt_address_state` varchar(100) DEFAULT NULL,<br />
  `alt_address_postalcode` varchar(20) DEFAULT NULL,<br />
  `alt_address_country` varchar(255) DEFAULT NULL,<br />
  `assistant` varchar(75) DEFAULT NULL,<br />
  `assistant_phone` varchar(25) DEFAULT NULL,<br />
  `lead_source` varchar(100) DEFAULT NULL,<br />
  `reports_to_id` char(36) DEFAULT NULL,<br />
  `birthdate` date DEFAULT NULL,<br />
  `portal_name` varchar(255) DEFAULT NULL,<br />
  `portal_active` tinyint(1) NOT NULL DEFAULT '0',<br />
  `portal_app` varchar(255) DEFAULT NULL,<br />
  `campaign_id` char(36) DEFAULT NULL,<br />
  PRIMARY KEY (`id`),<br />
  KEY `idx_cont_last_first` (`last_name`,`first_name`,`deleted`),<br />
  KEY `idx_contacts_del_last` (`deleted`,`last_name`),<br />
  KEY `idx_cont_del_reports` (`deleted`,`reports_to_id`,`last_name`),<br />
  KEY `idx_reports_to_id` (`reports_to_id`),<br />
  KEY `idx_del_id_user` (`deleted`,`id`,`assigned_user_id`),<br />
  KEY `idx_cont_assigned` (`assigned_user_id`)<br />
) ENGINE=InnoDB DEFAULT CHARSET=utf8;<br />
<br />
<br />
<br />
CREATE TABLE `contacts_cstm` (<br />
  `id_c` char(36) NOT NULL,<br />
  `nombre_c` varchar(25) DEFAULT NULL,<br />
  `apellido_c` varchar(25) DEFAULT NULL,<br />
  `tipo_c` varchar(255) DEFAULT 'DNI',<br />
  `numero_c` varchar(12) DEFAULT NULL,<br />
  `categoria_c` varchar(255) DEFAULT 'Contacto Simple',<br />
  `activado_c` varchar(255) DEFAULT NULL,<br />
  `motivo_c` varchar(255) DEFAULT 'empty',<br />
  `genero_c` varchar(100) DEFAULT '',<br />
  `fechanacimiento_c` date DEFAULT NULL,<br />
  `edad_c` int(2) DEFAULT NULL,<br />
  `direccion_c` varchar(70) DEFAULT NULL,<br />
  `codigopostal_c` varchar(255) DEFAULT NULL,<br />
  `localidad_c` varchar(255) DEFAULT NULL,<br />
  `distrito_c` varchar(255) DEFAULT NULL,<br />
  `seccion_c` varchar(255) DEFAULT '',<br />
  `provincia_c` varchar(255) DEFAULT 'Buenos Aires',<br />
  `telefono_c` varchar(20) DEFAULT NULL,<br />
  `telefonocelular_c` varchar(20) DEFAULT '',<br />
  `noenviarmails_c` tinyint(1) DEFAULT '0',<br />
  `estadocivil_c` varchar(255) DEFAULT '***Seleccione una opción***',<br />
  `hijos_c` varchar(255) DEFAULT NULL,<br />
  `cantidad_c` varchar(255) DEFAULT '***Seleccione una opción***',<br />
  `situacionlaboral_c` varchar(255) DEFAULT '-empty-',<br />
  `ocupacion_c` varchar(100) DEFAULT NULL,<br />
  `sector_c` varchar(255) DEFAULT NULL,<br />
  `nivelestudios_c` varchar(255) DEFAULT '-empty-',<br />
  `ingreso_c` varchar(255) DEFAULT '***Seleccione una opción***',<br />
  `vivienda_c` varchar(255) DEFAULT NULL,<br />
  `cantidaddeambientes_c` varchar(255) DEFAULT '***Seleccione una opción***',<br />
  `poseeinternet_c` tinyint(1) DEFAULT '0',<br />
  `temasactualidad_c` text,<br />
  `llega_c` varchar(255) DEFAULT NULL,<br />
  `comentarios_c` text,<br />
  `edaddesde_c` int(11) DEFAULT NULL,<br />
  `edadhasta_c` int(11) DEFAULT NULL,<br />
  `numeropersona_c` int(11) NOT NULL,<br />
  `caracteristica_c` int(5) DEFAULT NULL,<br />
  `caracteristica_celular_c` int(5) DEFAULT NULL,<br />
  `cod_area_c` int(5) DEFAULT NULL,<br />
  `cod_area_celular_c` int(5) DEFAULT NULL,<br />
  `fechacontacto_c` date DEFAULT NULL,<br />
  `horariocontacto_c` varchar(30) DEFAULT NULL,<br />
  `subcategoria_c` varchar(255) DEFAULT NULL,<br />
  `comocolaborar_c` text,<br />
  `country_c` varchar(255) DEFAULT 'ARGENTINA',<br />
  `experienciavoluntario_c` text,<br />
  `interesvoluntario_c` text,<br />
  `estadovoluntario_c` varchar(100) DEFAULT 'Registrado',<br />
  `sitioweb_c` varchar(50) DEFAULT NULL,<br />
  PRIMARY KEY (`id_c`),<br />
  KEY `idx_numeropersona_c` (`numeropersona_c`)<br />
) ENGINE=InnoDB DEFAULT CHARSET=utf8;<br />
<br />
<br />
<br />
QUERY:<br />
<br />
SELECT <br />
contacts.id,CONCAT(IFNULL(contacts.first_name,''),' ',IFNULL(contacts.last_name,'')) as name, contacts.first_name , contacts.last_name , contacts.salutation, contacts.assigned_user_id,<br />
contacts_cstm.activado_c,contacts_cstm.apellido_c,contacts_cstm.cantidaddeambientes_c,contacts_cstm.cantidad_c,contacts_cstm.caracteristica_c,contacts_cstm.caracteristica_celular_c,contacts_cstm.categoria_c,contacts_cstm.codigopostal_c,contacts_cstm.cod_area_c,contacts_cstm.cod_area_celular_c,contacts_cstm.comentarios_c,contacts_cstm.comocolaborar_c,contacts_cstm.country_c,contacts_cstm.direccion_c,contacts_cstm.distrito_c,contacts_cstm.edaddesde_c,contacts_cstm.edadhasta_c,contacts_cstm.edad_c,contacts_cstm.estadocivil_c,contacts_cstm.experienciavoluntario_c,contacts_cstm.fechacontacto_c,contacts_cstm.fechanacimiento_c,contacts_cstm.genero_c,contacts_cstm.hijos_c,contacts_cstm.horariocontacto_c,contacts_cstm.ingreso_c,contacts_cstm.interesvoluntario_c,contacts_cstm.llega_c,contacts_cstm.localidad_c,contacts_cstm.motivo_c,contacts_cstm.nivelestudios_c,contacts_cstm.noenviarmails_c,contacts_cstm.nombre_c,contacts_cstm.numeropersona_c,contacts_cstm.numero_c,contacts_cstm.poseeinternet_c,contacts_cstm.provincia_c,contacts_cstm.seccion_c,contacts_cstm.sector_c,contacts_cstm.sitioweb_c,contacts_cstm.situacionlaboral_c,contacts_cstm.subcategoria_c,contacts_cstm.telefono_c,contacts_cstm.temasactualidad_c,contacts_cstm.tipo_c,contacts_cstm.vivienda_c,<br />
accounts.name account_name,<br />
jtl0.account_id account_id , jt1.user_name assigned_user_name , jt1.created_by assigned_user_name_owner  , 'Users' assigned_user_name_mod<br />
FROM contacts <br />
LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c <br />
LEFT JOIN  accounts_contacts jtl0 ON contacts.id=jtl0.contact_id <br />
	AND jtl0.deleted=0 <br />
LEFT JOIN  accounts accounts ON accounts.id=jtl0.account_id <br />
	AND accounts.deleted=0<br />
	AND accounts.deleted=0  <br />
LEFT JOIN  users jt1 ON jt1.id= contacts.assigned_user_id <br />
	AND jt1.deleted=0<br />
WHERE <br />
	contacts.deleted=0 <br />
ORDER BY <br />
	numeropersona_c DESC <br />
LIMIT 0,101;<br />
<br />
<br />
EXPLAIN:<br />
<br />
id *	select_type *	table	type	possible_keys	key	key_len	ref	rows	Extra *<br />
1	SIMPLE	contacts	ref	idx_contacts_del_last,idx_cont_del_reports,idx_del_id_user	idx_contacts_del_last	2	const	6316	Using where; Using temporary; Using filesort<br />
1	SIMPLE	contacts_cstm	eq_ref	PRIMARY	PRIMARY	108	sugarcrm_db.contacts.id	1	<br />
1	SIMPLE	jtl0	ref	idx_contid_del_accid	idx_contid_del_accid	112	sugarcrm_db.contacts.id,const	1	Using index<br />
1	SIMPLE	accounts	eq_ref	PRIMARY,idx_accnt_id_del,idx_accnt_assigned_del	PRIMARY	108	sugarcrm_db.jtl0.account_id	1	<br />
1	SIMPLE	jt1	eq_ref	PRIMARY	PRIMARY	108	sugarcrm_db.contacts.assigned_user_id	1	<br />
<br />
<br />
<br />
From what I saw the problem is that it's not using the numeropersona_c index to sort the results, if I ommit the ORDER BY the query runs very fast, another scenario is if I remove the WHERE and make the LEFT JOIN with contacts_cstm an INNER JOIN the query uses the numeropersona_c index and the query also runs very fast. I think I can make that LEFT an INNER JOIN in the application but I can't ommit the WHERE condition.<br />
<br />
<br />
<br />
Any advice would be appretiated<br />
Thanks in advance]]></description>
            <dc:creator>Sebastian Ilari</dc:creator>
            <category>Performance</category>
            <pubDate>Fri, 03 Jul 2009 18:54:58 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?156,270134,270134#msg-270134</guid>
            <title>Upload data by FTP (no replies)</title>
            <link>http://forums.mysql.com/read.php?156,270134,270134#msg-270134</link>
            <description><![CDATA[ Is there any way to upload data file through FTP? <br />
<br />
Thanks in advance.]]></description>
            <dc:creator>Alex Colman</dc:creator>
            <category>Data Recovery</category>
            <pubDate>Fri, 03 Jul 2009 18:15:29 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?11,270131,270131#msg-270131</guid>
            <title>MySQL not starting during initial configuration (no replies)</title>
            <link>http://forums.mysql.com/read.php?11,270131,270131#msg-270131</link>
            <description><![CDATA[ I have been fussing with this off and on for 6 months.  During the initial configuration setup on XP PRO MySQL will not start on the localhost.  I have removed and reconfigured the instance numerous times with no luck.  I have port 3306 configured for TCP/IP and have the port in the firewall exclude list.  I have even RTFM.  I have SQL Server 2008 installed but stopped - works fine when it is running. Any help will be appreciated.<br />
Bob]]></description>
            <dc:creator>Bob Ivey</dc:creator>
            <category>Install</category>
            <pubDate>Fri, 03 Jul 2009 17:12:14 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?71,270129,270129#msg-270129</guid>
            <title>msql.exe se cae al intentar acceder ana tabla desde mi sitio web (no replies)</title>
            <link>http://forums.mysql.com/read.php?71,270129,270129#msg-270129</link>
            <description><![CDATA[ Hola.<br />
<br />
Tengo Xammp 1.7.1 instalado en un windows Vista ultimate. Desde esta mañana mi aplicacion web que tengo instalada en este equipo ha comenzado a provocar caidas del servicio mysqld.exe.<br />
<br />
Me he dado cuenta de que mientras ninguna de mis paginas accede a una tabla que llamo usuarios todo funciona correctamente, pero en cuanto entro en un página que accede a esta tabla el servicio msql se cae.<br />
<br />
Si entro con phpmyadmin, puedo ver todas las bases de datos que tengo creadas salvo la mia. Al puslar en ella se vuelve a caer el servicio.<br />
<br />
Todas las tablas de esta base de datos son InnoDB. Supongo que algo esta corrupto.<br />
<br />
¿Se puede recuperar? ¿Como?<br />
<br />
Saludos]]></description>
            <dc:creator>Tomas Martin</dc:creator>
            <category>Spanish</category>
            <pubDate>Fri, 03 Jul 2009 16:08:56 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?37,270128,270128#msg-270128</guid>
            <title>Error using hebrew chars (no replies)</title>
            <link>http://forums.mysql.com/read.php?37,270128,270128#msg-270128</link>
            <description><![CDATA[ My system is written in ASP on an IIS7 server (64bit) and I'm using &quot;MySQL ODBC 5.1 Driver&quot; as my connector. <br />
The system works fine in English but when I use Hebrew chars I get the following error:<br />
<br />
&quot;Microsoft OLE DB Provider for ODBC Drivers error '80040e21'<br />
 ODBC driver does not support the requested properties.&quot;<br />
<br />
Again, this error only takes place when I use Hebrew chars for writing into the database. It has no problem reading them though.<br />
Could anybody help me? <br />
Thanks in advance.]]></description>
            <dc:creator>Giora Genender</dc:creator>
            <category>ODBC</category>
            <pubDate>Fri, 03 Jul 2009 15:57:31 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?10,270127,270127#msg-270127</guid>
            <title>No such process (no replies)</title>
            <link>http://forums.mysql.com/read.php?10,270127,270127#msg-270127</link>
            <description><![CDATA[ Hello,<br />
   Can someone tell me what this error means? Mysql has been installed for some time and was running fine and then just stopped. As far as I can tell the box it resides on did not crash. <br />
<br />
When I try to restart it I get the below error.  <br />
<br />
Starting MySQL...../etc/init.d/mysql: line 159: kill: (16197) - No such process<br />
<br />
Any suggestions? I've been googling most of the night trying to figure this out however most responses/suggestions deal with recent installs which is not the case for me.<br />
<br />
Thanks!]]></description>
            <dc:creator>J G</dc:creator>
            <category>Newbie</category>
            <pubDate>Fri, 03 Jul 2009 15:55:31 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?10,270115,270115#msg-270115</guid>
            <title>Case sensitivity of query, not names, not data (1 reply)</title>
            <link>http://forums.mysql.com/read.php?10,270115,270115#msg-270115</link>
            <description><![CDATA[ I came across this weird situation where SELECT ... produces a different result from sELECT ....<br />
<br />
Please see below (note the row count at the end of the results).  <br />
<br />
<br />
Also, adding asc to the order clause fixes the situation (the last set below).<br />
<br />
Is there anything I need to look out for or adjust?<br />
<br />
&lt;pre&gt;<br />
mysql&gt; SELECT * FROM buy_action order by action ;<br />
+-------------+<br />
| action      |<br />
+-------------+<br />
| appointment |<br />
| bpreceived  |<br />
| bpsubmit    |<br />
| call        |<br />
| capture     |<br />
| converse    |<br />
| getcall     |<br />
| getmail     |<br />
| getrequest  |<br />
| getsms      |<br />
| getwebreq   |<br />
| mailbrpt    |<br />
| mailinfo    |<br />
| maillist    |<br />
| mandate     |<br />
| meet        |<br />
| sendfax     |<br />
| sendmail    |<br />
| sendsms     |<br />
| sms         |<br />
| snailmail   |<br />
| update      |<br />
+-------------+<br />
22 rows in set (0.00 sec)<br />
<br />
mysql&gt; sELECT * FROM buy_action order by action ;<br />
+-------------+<br />
| action      |<br />
+-------------+<br />
| appointment |<br />
| bpout       |<br />
| bpreceived  |<br />
| bpsubmit    |<br />
| call        |<br />
| capture     |<br />
| converse    |<br />
| followbp    |<br />
| followinfo  |<br />
| getcall     |<br />
| getmail     |<br />
| getrequest  |<br />
| getsms      |<br />
| getwebreq   |<br />
| infoout     |<br />
| mailbrpt    |<br />
| mailinfo    |<br />
| maillist    |<br />
| mandate     |<br />
| meet        |<br />
| sendfax     |<br />
| sendmail    |<br />
| sendsms     |<br />
| sms         |<br />
| snailmail   |<br />
| update      |<br />
+-------------+<br />
26 rows in set (0.00 sec)<br />
<br />
mysql&gt; SELECT * FROM buy_action order by action asc;<br />
+-------------+<br />
| action      |<br />
+-------------+<br />
| appointment |<br />
| bpout       |<br />
| bpreceived  |<br />
| bpsubmit    |<br />
| call        |<br />
| capture     |<br />
| converse    |<br />
| followbp    |<br />
| followinfo  |<br />
| getcall     |<br />
| getmail     |<br />
| getrequest  |<br />
| getsms      |<br />
| getwebreq   |<br />
| infoout     |<br />
| mailbrpt    |<br />
| mailinfo    |<br />
| maillist    |<br />
| mandate     |<br />
| meet        |<br />
| sendfax     |<br />
| sendmail    |<br />
| sendsms     |<br />
| sms         |<br />
| snailmail   |<br />
| update      |<br />
+-------------+<br />
26 rows in set (0.00 sec)<br />
&lt;/pre&gt;]]></description>
            <dc:creator>Timo Kriel</dc:creator>
            <category>Newbie</category>
            <pubDate>Fri, 03 Jul 2009 15:05:27 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?39,270113,270113#msg-270113</guid>
            <title>com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: (4 replies)</title>
            <link>http://forums.mysql.com/read.php?39,270113,270113#msg-270113</link>
            <description><![CDATA[ Hi i am a newbie in mysql and i have written a code in java with mysql as the db. The error which i get while executing one of the codes is <br />
<br />
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: 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 'limit '1', '5'' at line 1<br />
<br />
and the mysql query is <br />
<br />
s.executeQuery(&quot;select p.product_name, p.product_desc,v.vendor_name from product p, vendor v, category c where c.category_id='&quot;+keyid+&quot;' and p.vendor_id=v.vendor_id and limit '&quot;+fr+&quot;', '&quot;+lr+&quot;'&quot;);<br />
<br />
fr, lr and keyid are the parameters passed to a method in which this query is written.<br />
<br />
any help would be appreciated <br />
<br />
thanks !]]></description>
            <dc:creator>Anil Karamchandani</dc:creator>
            <category>JDBC and Java</category>
            <pubDate>Fri, 03 Jul 2009 15:14:13 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?10,270113,270120#msg-270120</guid>
            <title>com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: (-1 replies)</title>
            <link>http://forums.mysql.com/read.php?10,270113,270120#msg-270120</link>
            <description><![CDATA[  -- moved topic -- ]]></description>
            <dc:creator>Anil Karamchandani</dc:creator>
            <category>Newbie</category>
            <pubDate>Fri, 03 Jul 2009 15:04:42 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?153,270112,270112#msg-270112</guid>
            <title>Best practice - variable number of fields (no replies)</title>
            <link>http://forums.mysql.com/read.php?153,270112,270112#msg-270112</link>
            <description><![CDATA[ Hello,<br />
<br />
I am recording user's hobbies. I have a reference table with the unique hobbies. In my &quot;UserHobbies&quot; table I need to associate each user with his list of hobbies. Should I have separate integer fields to record their hobbies, like &quot;Hobby1&quot;, &quot;Hobby2&quot; etc (let's say up to 10, leaving extra unused ones blank), or should I have just one varchar field &quot;Hobby&quot; where I concatenate the hobbies separated by semicolons? Which is a best practice for such a necessity?<br />
<br />
Much appreciated.]]></description>
            <dc:creator>Vlad Gotlib</dc:creator>
            <category>Workbench - Database Modeling</category>
            <pubDate>Fri, 03 Jul 2009 14:45:19 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?10,270104,270104#msg-270104</guid>
            <title>problems with update (1 reply)</title>
            <link>http://forums.mysql.com/read.php?10,270104,270104#msg-270104</link>
            <description><![CDATA[ I have the following table:<br />
 <br />
+---------+---------------------+--------+---------------+<br />
| LoginID | LoginTimeNOW        | CompID | LogoutTimeNOW |<br />
+---------+---------------------+--------+---------------+<br />
|       1 | 2009-07-03 14:36:23 | k4423  | NULL          |<br />
+---------+---------------------+--------+---------------+<br />
1 row in set (0.00 sec)<br />
 <br />
I want to update it so that the NULL entry changed to a DATETYPE now(), like this:<br />
 <br />
update Logins set LogoutTimeNOW=now() where CompID='k4423' AND LogoutTimeNOW=NOW;<br />
 <br />
but this doesnt work. Is this a bug, or is there a way to do this simple task?<br />
 <br />
[now() returns the date and time]]]></description>
            <dc:creator>Rea Kel</dc:creator>
            <category>Newbie</category>
            <pubDate>Fri, 03 Jul 2009 13:27:32 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?47,270103,270103#msg-270103</guid>
            <title>DLL protection (no replies)</title>
            <link>http://forums.mysql.com/read.php?47,270103,270103#msg-270103</link>
            <description><![CDATA[ Hello!<br />
For security I should not to use any temporary files except single .exe. DLLs should be embedded in exe file. Would you, please, advice me how can I load DLLs, used in my app, without extracting them run-time?<br />
Thanks!]]></description>
            <dc:creator>David Patricks</dc:creator>
            <category>C#, Mono, .Net</category>
            <pubDate>Fri, 03 Jul 2009 13:09:41 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,270102,270102#msg-270102</guid>
            <title>Effective tool for run-time errors and memory leaks detection (no replies)</title>
            <link>http://forums.mysql.com/read.php?45,270102,270102#msg-270102</link>
            <description><![CDATA[ Hi!<br />
<br />
Created application is working toooo slow, looks like there are a lot of memory leaks, there are a lot of pointers.  So, please, can you advice some effective tool for run-time errors and memory leaks detection in Visual Studio C++?]]></description>
            <dc:creator>David Patricks</dc:creator>
            <category>C/C++</category>
            <pubDate>Fri, 03 Jul 2009 13:07:31 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?98,270101,270101#msg-270101</guid>
            <title>Reading a flat file and execute command dynamically (no replies)</title>
            <link>http://forums.mysql.com/read.php?98,270101,270101#msg-270101</link>
            <description><![CDATA[ Is it possible to read the a flat file in mysql procedure?<br />
<br />
we get numerous flat files with sql statement in it. basically we want<br />
to:<br />
<br />
1. read the list of .sql file in a directory <br />
2. read each sql file in turn <br />
3. read each sql statement in the sql file and fire that dynamically.<br />
if it fails then write the error to error table <br />
4. finally delete the sql file<br />
<br />
we have done it in oracle using a oracle job. is it possible to do so in mysql.]]></description>
            <dc:creator>pratap kumar tripathy</dc:creator>
            <category>Stored Procedures</category>
            <pubDate>Fri, 03 Jul 2009 12:56:36 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?10,270101,270125#msg-270125</guid>
            <title>Reading a flat file and execute command dynamically (-1 replies)</title>
            <link>http://forums.mysql.com/read.php?10,270101,270125#msg-270125</link>
            <description><![CDATA[  -- moved topic -- ]]></description>
            <dc:creator>pratap kumar tripathy</dc:creator>
            <category>Newbie</category>
            <pubDate>Fri, 03 Jul 2009 12:56:36 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?10,270100,270100#msg-270100</guid>
            <title>Primary key is not allowing same value in upper and lower case (1 reply)</title>
            <link>http://forums.mysql.com/read.php?10,270100,270100#msg-270100</link>
            <description><![CDATA[ Primary key is not allowing same value in upper and lower case. we need to allow this. is there any way. Please see details below to replicate the problem.<br />
<br />
mysql&gt; create table pkt (name varchar(10) not null);<br />
Query OK, 0 rows affected (0.16 sec)<br />
<br />
mysql&gt; alter table pkt add primary key pk_pkt(name);<br />
Query OK, 0 rows affected (0.22 sec)<br />
Records: 0  Duplicates: 0  Warnings: 0<br />
<br />
mysql&gt; insert into pkt values('pratap');<br />
Query OK, 1 row affected (0.03 sec)<br />
<br />
mysql&gt; insert into pkt values('PRATAP');<br />
ERROR 1062 (23000): Duplicate entry 'PRATAP' for key 'PRIMARY']]></description>
            <dc:creator>pratap kumar tripathy</dc:creator>
            <category>Newbie</category>
            <pubDate>Fri, 03 Jul 2009 13:46:49 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?10,270093,270093#msg-270093</guid>
            <title>subquery/self join syntax help (no replies)</title>
            <link>http://forums.mysql.com/read.php?10,270093,270093#msg-270093</link>
            <description><![CDATA[ Hello all, I wonder if someone can point me in the right direction....<br />
<br />
I am working with nested sets for a tree structure, and am trying to retrieve all leaf nodes of any nodes with a particular option. For example my tree has many trees, the nodes of which represent particular options e.g. colour, size etc, each tree represents one product.<br />
<br />
I would like to be able to select all leaf nodes where a tree has an option red (npt_option=7) - the node which has an option of red could then have descendants with a size option or anything else.<br />
<br />
So for each row I have a left and right value and also an option value, selecting rows of a particular option is easy enough:<br />
<br />
SELECT npt_left, npt_right<br />
FROM tbl_product_tree<br />
WHERE npt_option = 7<br />
<br />
But the rows returned are not necessarily leaf nodes, so now I need to use the left and right values returned from this simple query to select the rows (from the same table) whose left and right values are between these left and right values - this will return all descendants, I can then cut that down to leaf nodes by selecting only those that whose right value is equal to it's left value + 1.<br />
<br />
So I have the following so far:<br />
<br />
SELECT node.npt_node, node.npt_left, node.npt_right, node.npt_child, node.npt_product<br />
FROM tbl_product_tree AS node, (<br />
	SELECT npt_left, npt_right<br />
	FROM tbl_product_tree<br />
	WHERE npt_option = 7<br />
) AS opt<br />
WHERE node.npt_left BETWEEN opt.npt_left AND opt.npt_right<br />
AND node.npt_right = node.npt_left + 1<br />
<br />
Which doesn't give me an error, but doesn't give me the result I would like either! I think I need a self join here, but I can't work out the syntax.<br />
<br />
Any help would be appreciated.<br />
<br />
Many thanks, Tom.]]></description>
            <dc:creator>Tom Gill</dc:creator>
            <category>Newbie</category>
            <pubDate>Fri, 03 Jul 2009 11:40:06 +0000</pubDate>
        </item>
    </channel>
</rss>
