kurczę cały czas ten sam błąd
wkleiłem tak jak trzeba było
CODE
function sz_powiaty($id)
{
if (empty($id))
return array();
global $database;
$out = '';
$database->setQuery( "select fieldtitle, fieldvalueid from #__comprofiler_field_values where fieldid=$id order by ordering asc" );
$powiaty = $database->loadObjectList();
if ($database->getErrorNum()) {
echo $database->stderr();
return;
}
foreach($powiaty as $powiat)
{
$out .= ''.$powiat->fieldtitle.'';
}
return $out;
}
CODE
function sz_pobierzPodKategorie($id)
{
if (empty($id))
return array();
global $database;
$database->setQuery( "select fieldtitle, fieldvalueid from #__comprofiler_field_values where fieldid=$id order by ordering asc" );
$podKategorie = $database->loadObjectList();
if ($database->getErrorNum()) {
echo $database->stderr();
return;
}
return $podKategorie;
}
a błąd to nadal ten sam komunikat
CODE
DB function failed with error number 1064
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 '' at line 1 SQL=select fieldtitle from jos_comprofiler_field_values where fieldvalueid=DB function failed with error number 1064
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 '' at line 1 SQL=select fieldtitle from jos_comprofiler_field_values where fieldvalueid=
Cały skrypt zmieniony tak jak kazał nospor
http://sabayonlinux.pl/upload/tmp/text2.txt