PHPDaemon/Clients/PostgreSQL/Connection.php 1 location
|
@@ 361-370 (lines=10) @@
|
358 |
|
* @callback $cb ( ) |
359 |
|
* @return boolean Success |
360 |
|
*/ |
361 |
|
public function command($cmd, $q = '', $cb = NULL) { |
362 |
|
if ($this->state !== self::STATE_AUTH_OK) { |
363 |
|
return FALSE; |
364 |
|
} |
365 |
|
|
366 |
|
$this->onResponse->push($cb); |
367 |
|
$this->sendPacket($cmd, $q); |
368 |
|
|
369 |
|
return TRUE; |
370 |
|
} |
371 |
|
|
372 |
|
/** |
373 |
|
* Set default database name |
PHPDaemon/Clients/MySQL/Connection.php 1 location
|
@@ 405-415 (lines=11) @@
|
402 |
|
* @callback $cb ( Connection $conn, boolean $success ) |
403 |
|
* @return boolean Success |
404 |
|
*/ |
405 |
|
public function command($cmd, $q = '', $cb = NULL) { |
406 |
|
if ($this->phase !== self::PHASE_HANDSHAKED) { |
407 |
|
return false; |
408 |
|
} |
409 |
|
|
410 |
|
$this->onResponse->push($cb); |
411 |
|
$this->seq = 0; |
412 |
|
$this->sendPacket(chr($cmd) . $q); |
413 |
|
|
414 |
|
return TRUE; |
415 |
|
} |
416 |
|
|
417 |
|
/** |
418 |
|
* Sets default database name |