|
10-26-2005, 08:46 AM | #1 |
Orange Mole
Join Date: Aug 2005
Posts: 44
|
Problem Mysql when no results
Hello,
When there are no results I have this error Mysql : Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/httpd/vhosts/corsica-produits.com/httpdocs/google/libs/search_functions.php on line 650 I have: PHP 4.4.0-3 Mysql 4.1.14-3 What is wrong ? ****************** I have an over I problem, I m french, and I have problems with accents and EURO symbol in the results, there are Chinese Symbols ;( Thank you Noël |
10-26-2005, 02:41 PM | #2 |
Orange Mole
Join Date: Aug 2005
Posts: 44
|
I did a fresh install of phpdig 1.8.1 what I have to change in the config file to have the same configuration as phpdig 1.8.7 for the character.
Because with phpdig 1.8.7 I didn't have any problèm whith the display of chracter and I was <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> What I have to change in the config file to have the same ? Thank you Noël I steel have the problem with mysql no results error. |
10-27-2005, 12:06 AM | #3 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
It seems that the query is failing because MySQL doesn't understand the _utf8 bit in the query on line 649 of the search_functions.php file. MySQL 4.1.7+ should be able to understand the query, so you might want to recheck your MySQL version. When using PhpDig 1.8.8 RC1, see the following in the config file:
Code:
// you may have to change this constant depending on the page encoding, for instance... // define('DETECT_ORDER','UTF-8,ISO-8859-7,ASCII'); // or // define('DETECT_ORDER','UTF-8,Windows-1251,ASCII'); // or // define('DETECT_ORDER','UTF-8,BIG-5,ASCII'); // or // define('DETECT_ORDER','UTF-8,JIS,KOI8-R,EUC-KR,EUC-JP,SJIS,BIG-5'); // etcetera // the first non UTF-8 encoding in the constant that 'matches' the page is used in conversion to UTF-8. // note that some pages can match multiple encodings even though only one encoding displays correctly. // for example, if you do a search and see chinese characters in german text, the order is not correct. // you may need to set/reset this constant, as there is no perfect ordering for all pages. // furthermore, some encodings have multiple names (e.g., CP1251 like Windows-1251). // if needed, edit the function phpdigMakeUTF8 in robot_functions.php to account for multiple names. define('DETECT_ORDER','UTF-8,KOI8-R,JIS,SJIS,CP936,BIG-5,EUC-CN,EUC-TW,EUC-KR,EUC-JP'); Code:
define('DETECT_ORDER','ISO-8859-1,ASCII');
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension. |
10-27-2005, 08:55 AM | #4 |
Orange Mole
Join Date: Aug 2005
Posts: 44
|
Is that can help somebody :
When I install PHPDIG 1.8.1 RC it didn't want to create th database, so I used PHPMYADMIN to create the database, but the database has been created with Interclassement : latin1_swedish_ci and also the tables. So I put everywhere in the table, where there was latin1_swedish_ci I put utf8_general_ci Now I haven't any errors Sorry for the english |
10-27-2005, 10:56 AM | #5 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
If you ever need to set up the tables again, and you cannot create the database using the PhpDig install, select create tables from the install, and that should install the tables into whatever database matches the input.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
basic php/mysql verification problem | sturomanek | Coding & Tutorials | 1 | 03-21-2007 08:06 PM |
Problem with MySQL 4.1 | machek | Bug Tracker | 0 | 08-05-2006 04:28 AM |
Results to display info from mysql table | kjhay | How-to Forum | 4 | 09-03-2005 02:34 PM |
Slight problem with results. | Dave A | Troubleshooting | 13 | 08-07-2005 07:11 AM |
problem with results | marchelly | Troubleshooting | 1 | 09-11-2004 07:14 AM |