Forums

ERROR

Nanie 25 Oct, 2010
i make a a form n and database using chronoconnectivity. and have a error like this :

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 '
Parse error: syntax error, unexpected T_STRING, expecting T_VARIA' at line 1 SQL=SELECT count(*) FROM jos_chronoforms_borangsatu
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in C:\AppServ\www\components\com_chronoconnectivity\libraries\connection.php(168) : eval()'d code on line 4


how to repair his error ?
can show the tutorial?

AND where place jos_content for i fing it?
GreyHead 25 Oct, 2010
Hi Nanie,

This looks like an error in the code you have in the WHERE SQL box of your Connection. Please check the code and paste a copy here if you can't see the error.

AND where place jos_content for i fing it?


I don't understand this ??

Bob
Nanie 26 Oct, 2010
this is the kode from sql...
<?php
$search_array = array('radio2');
$where = array ();
foreach ( $search_array as $ search) {
  $ value = JRequest::getVar ($search,'','post');
  if ( $value) {
    $where[] = " $search LIKE '%$value% ' ";
    }
     }
  if ( !empty($where) ) {
  echo " WHERE ".implode(' AND ',$where);
}
?>
GreyHead 26 Oct, 2010
Hi Nanie,

In line 4 you have $ search instead of $search and in line 5 you have $ value instead of $value.

Bob

PS I deleted your reply to this because posting the file code broke the forum.
GreyHead 26 Oct, 2010
Nanie wrote:

the problem i line 4 and 5 is solve now exist error :
Parse error: syntax error, unexpected T_STRING in C:\AppServ\www\components\com_chronoconnectivity\libraries\connection.php(303) : eval()'d code on line 6

this is the code from connection.php :
// code deleted
GreyHead 26 Oct, 2010
Hi Nanie,

This is another error in your WHERE SQL code - on line 6 this time, not in the ChronoConnectivity.php file.

Please check your PHP carefully.

Bob
Nanie 27 Oct, 2010
where can i find the error??? isn't this??
kode from chronoconnectivity.php

[[>> File code removed again : greyhead <<]]
GreyHead 27 Oct, 2010
Hi Nanie,

This is another error in your WHERE SQL code - on line 6 this time, . . . Please check your PHP carefully.



And please stop posting the chronoconnectivity.php file in the forums - there is nothing wrong with this file.

Boba
This topic is locked and no more replies can be posted.