Я получаю ошибку: Неустранимая ошибка: только переменные могут быть переданы по ссылке в
когда я пытаюсь проверить сервис в Flex Builder
(!) Неустранимая ошибка: только переменные могут передаваться по ссылке в "phpfile"
и вот когда я звоню:
mysqli_stmt_bind_result($stmt, $row->city.Id, $row->prov.Id, $row->dist.Id, $row->coun.Id);
вот и весь файл:
<?php
class TblcityService {
var $username = "root";
var $password = "";
var $server = "localhost";
var $port = "3306";
var $databasename = "xoffercommon";
var $tablename = "tblcity";
var $connection;
public function __construct() {
$this->connection = mysqli_connect(
$this->server,
$this->username,
$this->password,
$this->databasename,
$this->port
);
mysqli_set_charset($this->connection,'utf8');
$this->throwExceptionOnError($this->connection);
}
public function getCityProvDistCoun($cityID) {
$query = "SELECT city.Id, prov.Id, dist.Id, coun.Id FROM ((tblCity AS city INNER JOIN tblProvence AS prov ON city.tblProvence_Id = prov.ID) INNER JOIN tblDistrict AS dist ON prov.tblDistrict_Id = dist.ID) INNER JOIN tblCountry AS coun ON dist.tblCountry_Id = coun.ID WHERE city.id = ?";
$stmt = mysqli_prepare($this->connection, $query);
$this->throwExceptionOnError();
mysqli_stmt_bind_param($stmt, 'i', $cityID);
$this->throwExceptionOnError();
mysqli_stmt_execute($stmt);
$this->throwExceptionOnError();
mysqli_stmt_bind_result($stmt, $row->city.Id, $row->prov.Id, $row->dist.Id, $row->coun.Id);
if(mysqli_stmt_fetch($stmt)) {
return city.Id;
} else {
return null;
}
}
/**
* Utility function to throw an exception if an error occurs
* while running a mysql command.
*/
private function throwExceptionOnError($link = null) {
if($link == null) {
$link = $this->connection;
}
if(mysqli_error($link)) {
$msg = mysqli_errno($link) . ": " . mysqli_error($link);
throw new Exception('MySQL Error - '. $msg);
}
}
}
?>
единственное отличие, которое я вижу по сравнению с остальными моими запросами, выполняемыми с php, состоит в том, что на этот раз это объединение и используется нотация "имя_папки". "Fieldname", может ли это быть "." дает ошибку ссылки? Я так, что такое sybt