| Autor | Zpráva | ||
|---|---|---|---|
| PPetr Profil * |
#1 · Zasláno: 28. 5. 2014, 21:57:25
Ahoj, mohl by mi prosím nějaký profík přepsat tohle pro PDO v PHP ? Děkuji
$res = $this->db->query($sql);
if ($this->db->affected_rows == 0){
return $this->error(0);
}
$data = $res->fetch_object(); |
||
|
Časová prodleva: 6 dní
|
|||
| scheras Profil * |
#2 · Zasláno: 3. 6. 2014, 10:14:58
<?php
try {
$dbh = new PDO('mysql:host=localhost;dbname=test', $user, $pass);
$stmt = $dbh->prepare( $sql );
$stmt->execute( $array );
$affected_rows = $stmt->rowCount();
$data = $dbh->fetchAll( $fetch_style );
}
catch ( PDOException $exception ) {
return $exception;
}
?> |
||
|
Časová prodleva: 12 let
|
|||
0