What does the -> operator do in PHP?

zurna3

New member
I was looking at an examples on using flashbuilder & mysql and i'm pretty new to php and found the following example, I was wondering what does -> do I haven't encountered it before i'm guessing it's some kind of assignment operator.


public function getAllEmployees($q) {

$sql = "SELECT * FROM $this->tablename WHERE first_name LIKE '%$q%' OR last_name LIKE '%$q%' OR email_address LIKE '%$q%'";

$stmt = mysqli_prepare($this->connection,$sql);

$this->throwExceptionOnError();

mysqli_stmt_execute($stmt);
$this->throwExceptionOnError();

$rows = array();

mysqli_stmt_bind_result($stmt, $row->emp_no, $row->birth_date, $row->first_name, $row->last_name, $row->gender, $row->hire_date, $row->phone_no, $row->email_address, $row->job_title);

while (mysqli_stmt_fetch($stmt)) {
$rows[] = $row;
$row = new stdClass();
mysqli_stmt_bind_result($stmt, $row->emp_no, $row->birth_date, $row->first_name, $row->last_name, $row->gender, $row->hire_date, $row->phone_no, $row->email_address, $row->job_title);
}

mysqli_stmt_free_result($stmt);
mysqli_close($this->connection);

return $rows;
}

The example was from http://www.flashrealtime.com/flash-builder-4-and-php-data-services/
 
Back
Top