note 100366 deleted from pdostatement.rowcount by danbrown
| From: | danbrown@php.net | Date: | Mon, 11 Oct 2010 18:12:08 +0000 |
| Subject: | note 100366 deleted from pdostatement.rowcount by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-173147@lists.php.net to get a copy of this message | ||
Note Submitter: da . executor (et] mr2tuning DOT ch
----
The easiest way to get the row's affected by your select statement is the following way I
guess:
class salesreport extends reports {
//put your code here
function __construct(){
// Start kunden table query
$this->kundenSQL = "Select * from T_Kunden";
// Start zahlungen table query
$this->zahlungenSQL = "Select * from T_Zahlungen";
// Start auftrag table query
$this->auftragSQL = "Select * from T_Auftrag";
}
function setCustomerTyp($typ){
if($typ == 0){
$this->kundenSQL = $this->kundenSQL ." WHERE \"Name der Firma\"
<> ''";
}elseif($typ == 1){
$this->kundenSQL = $this->kundenSQL ." WHERE \"Name der Firma\" ==
''";
}
}
function getCustomers(){
try {
$db = new db_odbc();
$sql = $db->con->query($this->kundenSQL);
$this->customers = $sql->fetchAll(PDO::FETCH_ASSOC);
$this->cCount = count($this->customers);
}
catch(PDOException $e)
{
echo $e->getMessage();
}
}
}