This topic is locked

Query results

7/29/2011 8:55:14 AM
PHPRunner General questions
W
webdino author

Hello,

I try to make a query on the before record display (and try in other events) but it does not work

the problem: it returns only 1 record!! But in the table there are 3 records. All other selects in my project do the same?

whats wrong at my dbquery? I need arrays of data not only 1 dataset when 3 datasets match to my select
global $conn;

$strSQLExists = "select * from Kunde";

$rsExists = db_query($strSQLExists,$conn);

$data=db_fetch_array($rsExists);

if($data){

// if record exists do something

var_dump($data);
}else{

// if dont exist do something else
}

C
cgphp 7/29/2011
global $conn;

$strSQLExists = "select * from Kunde";

$rsExists = db_query($strSQLExists,$conn);

while($data=db_fetch_array($rsExists))

{

echo $data['field_name'];

}