You are here:  » New SQL version?


New SQL version?

Submitted by madstock on Wed, 2006-03-29 11:42 in

My hosts have recently "upgraded" to PHP5 (MySQL is still 4.1.12), and everything is fine, except the search facility (when entering a query as opposed to directly calling a product).

(Whereas previous databases were of the format SERVERNAME_DATABASENAME , they are now SERVERNAME-DATABASENAME - I don't know if this gives any indication of what the problem may be??)

The errors are:

at:

'Can you give us the sql_query code that is causing this problem and if posible a "show create table" on the table. So we can look into why this is occuring.'

Would you be able to enlighten me, please? I am using the "old" version of the script (i.e. before ratings etc.)

Submitted by support on Wed, 2006-03-29 12:00

Ok, it's related to the full text index; which kicks in if the search string is 4 or more characters:

Works:
http://www.toys.madstock.com/search.php?q=200

Doesn't work:
http://www.toys.madstock.com/search.php?q=2000

On the case...

Submitted by support on Wed, 2006-03-29 12:05

It sounds like the full text index has been lost. Do you have command line access to mysql? Alternatively, you could try running the create index script from the original thread:

dbindex.php:

<?php
  set_time_limit
(0);
  
ignore_user_abort();
  require(
"includes/common.php");
  require(
"includes/database.php");
  require(
"includes/header.php");
  print 
"<p>Building FULLTEXT index on `products`...</p>";
  
$sql "ALTER TABLE `".$config_databaseTablePrefix."products` ADD FULLTEXT INDEX (name)";
  
database_queryModify($sql,$rows);
  print 
"<p>Done.</p>";
  require(
"includes/footer.php");
?>

May take a few minutes to run...

Submitted by madstock on Wed, 2006-03-29 12:14

Thanks Dave, that has sorted it out - I appear to have uploaded an very old version of something..

(I have editted out the error URLs above)

Thanks again,
Duncan
madstock.com