Hallo zusammen,
ich erhalte bei beiden Abfragen folgendes:
Woran kann das liegen?
Bedanke mich für Eure Hilfe!
Gruss Raggazzi
ich erhalte bei beiden Abfragen folgendes:
Code:
Unknown SQL Error.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
PHP-Code:
function GetVehicles($config)
{
$rows=array();
mysql_connect($config->host, $config->user, $config->password) or die('Database Server-Connection Failed');
mysql_select_db($config->db) or die('Database Connection Failed');
$sql = 'SELECT * from '.$config->dbprefix.'management_vehicle';
$result = mysql_query($sql) or die ("Unknown SQL Error.".mysql_error());
if(mysql_num_rows($result))
while($row = mysql_fetch_assoc($result))
$rows[sizeof($rows)]=$row;
return $rows;
}
PHP-Code:
function GetPersons($config)
{
$rows=array();
mysql_connect($config->host, $config->user, $config->password) or die('Database Server-Connection Failed');
mysql_select_db($config->db) or die('Database Connection Failed');
$sql = 'SELECT * from '.$config->dbprefix.'management_person';
$result = mysql_query($sql) or die ("Unknown SQL Error.".mysql_error());
if(mysql_num_rows($result))
while($row = mysql_fetch_assoc($result))
$rows[sizeof($rows)]=$row;
return $rows;
}
Gruss Raggazzi
Kommentar