php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23100 bad arugument in function.implode
Submitted: 2003-04-07 16:09 UTC Modified: 2003-04-07 16:50 UTC
From: support at daystardistributing dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.3.1 OS: Linux
Private report: No CVE-ID: None
 [2003-04-07 16:09 UTC] support at daystardistributing dot com
When trying to use my search engine using this code

function boolean_sql_select_short($string,$match){
	$match_a = explode(',',$match);
	$score_unit_weight = .2;
	for($ith=0;$ith<count($match_a);$ith++){
		$score_a[$ith] =
			"$score_unit_weight*(
			LENGTH($match_a[$ith]) -
			LENGTH(REPLACE(LOWER('$match_a[$ith]'),LOWER('$string'),'')))/LENGTH('$string')";
	}

               $score = implode(" + ",$score_a);

	return $score;
}

I get the following retuned error:

Warning: implode() [function.implode]: Bad arguments. in /*/*/public_html/search/mysql_boolean.txt on line 45
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 ') - LENGTH(REPLACE(LOWER(''),LOWER('eyb'),'')))/LENGTH('eyb'

Need help solving this issue, thanks.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-07 16:50 UTC] jay@php.net
This isn't the right place to look for PHP support. If you 
need help, please check out the php-general ("General user 
list") mailing list.  
 
http://www.php.net/mailing-lists.php 
 
J 
 
 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 06 19:01:27 2024 UTC