[PHP-DB] Mysql 5.5 and PHP Mysql API Version 5.1.41
Hey there, I've just migrated to Mysql 5.5 from source and it works like a charm. Still every now and then (in intervals of approximatly an hour) I get the following error: Error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 110' in /home/ydadmin/build/lieferando.de/11720/library/Zend/Db/Adapter/Pdo/Abstract.php:129 Stack trace: #0 /home/ydadmin/build/lieferando.de/11720/library/Zend/Db/Adapter/Pdo/Abstract.php(129): PDO->__construct('mysql:port=6664...', '#', '#', Array) #1 /home/ydadmin/build/lieferando.de/11720/library/Zend/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect() #2 /home/ydadmin/build/lieferando.de/11720/library/Zend/Db/Adapter/Abstract.php(448): Zend_Db_Adapter_Pdo_Mysql->_connect() #3 /home/ydadmin/build/lieferando.de/11720/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES 'utf8...', Array) #4 /home/ydadmin/build/lieferando.de/11720/application/Bootstrap.php(99): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES 'utf8...') #5 /home/ydadmin/build/lieferando.de/11720/library/Zend/App in /home/ydadmin/build/lieferando.de/11720/library/Zend/Db/Adapter/Pdo/Abstract.php on line 144 It is like any queue is running full and this is the result, but actually no clue. My first guess is the API Version of the mysql client I am using with the precompiled php binaries (Ubuntu 10.10 Server, PHP 5.3.2-1ubuntu4.7 with Suhosin-Patch (cli) (built: Jan 12 2011 18:36:55)) Does anyone else have the same problems? Thanks for any help, Matthias -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Displaying Results
Dear List - I have a form. In one field, the customer types the name of a product. The first seven(7) results of the MySQL query that the entry generates should be displayed as a clickable drop down list. How do I do it? Thanks. Ethan MySQL 5.1 PHP 5.3.3-6 Linux [Debian (sid)] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Displaying Results
Ethan Rosenberg wrote: Dear List - I have a form. In one field, the customer types the name of a product. The first seven(7) results of the MySQL query that the entry generates should be displayed as a clickable drop down list. How do I do it? Thanks. Ethan MySQL 5.1 PHP 5.3.3-6 Linux [Debian (sid)] You said you have a form.. do have anything else. ;-).. ie, the mysql query etc.. (not sure what you are needing an answer to.. retrieving records from mysql, or how to display them) Anyway, I think you mean you want to have "7 option's in a select form element"? print ""; //Your loop of found records starts here print "$otherdbfield"; //Your loop ends here print ""; .. Me thinks we need more input.. maybe post the code that you have. Donovan -- D Brooke -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Search relevance
I would like to have the search results display in order of relevance --- and essentially add these two lines to the query. HAVING relevance > 0.2 ORDER BY relevance DESC However with how I built the database and the search spanning several tables I am unsure how to do this. Could someone help me please? Ron SELECT `ministry_profiles`.`reference`, `ministry_profiles`.`organization`, `ministry_profiles_activity`.`activity` FROM ( ( ( `ministry_profiles` LEFT OUTER JOIN `ministry_profiles_listing_details` ON `ministry_profiles`.`reference` = `ministry_profiles_listing_details`.`ministry_profile_reference` ) LEFT OUTER JOIN `ministry_profiles_activity` ON `ministry_profiles`.`reference` = `ministry_profiles_activity`.`ministry_profiles_reference` ) LEFT OUTER JOIN `ministry_profile_categories` ON `ministry_profiles`.`reference` = `ministry_profile_categories`.`ministry_profiles_reference` ) LEFT OUTER JOIN `ministry_categories` ON `ministry_profile_categories`.`ministry_categories_reference` = `ministry_categories`.`reference` WHERE ( MATCH( `ministry_profiles`.`organization`, `ministry_profiles`.`address_line_1`, `ministry_profiles`.`address_line_2`, `ministry_profiles`.`city`, `ministry_profiles`.`province_state`, `ministry_profiles`.`postal_zip_code`, `ministry_profiles`.`country`, `ministry_profiles`.`telephone`, `ministry_profiles`.`toll_free`, `ministry_profiles`.`fax`, `ministry_profiles`.`email`, `ministry_profiles`.`website` ) AGAINST ('$search') AND `ministry_profiles`.`live` =1 ) OR ( MATCH( `ministry_categories`.`category` ) AGAINST ('$search') ) OR ( MATCH( `ministry_profiles_activity`.`activity` ) AGAINST ('$search') AND `ministry_profiles_activity`.`live` =1 ) OR ( MATCH( `ministry_profiles_listing_details`.`contact`, `ministry_profiles_listing_details`.`year_founded`, `ministry_profiles_listing_details`.`volunteer_opportunities`, `ministry_profiles_listing_details`.`employment_opportunities`, `ministry_profiles_listing_details`.`members_of`, `ministry_profiles_listing_details`.`major_events`, `ministry_profiles_listing_details`.`associate_member_of`, `ministry_profiles_listing_details`.`registration_number`, `ministry_profiles_listing_details`.`fund_raising`, `ministry_profiles_listing_details`.`accredited_by`, `ministry_profiles_listing_details`.`facebook`, `ministry_profiles_listing_details`.`twitter` ) AGAINST ('$search') AND `ministry_profiles_listing_details`.`live` =1 ) GROUP BY `ministry_profiles`.`reference`
[PHP-DB] Re: [PHP] Jquery
I see firebug-lite-debug.js but not jquery.js. Does firebug include jquery? David