pdo - Equal in select does not work as expected -
i found funny behaviour using equal pdo. checked several select-statements in phpmyadmin , pdo , results vary. has idea whats wrong?
$sql = "select * fenster fenster > 'news'"; //works ok $sql = "select * fenster fenster < 'news'"; //works ok $sql = "select * fenster fenster <= 'news'"; //works ok $sql = "select * fenster fenster >= 'news'"; // news not in result $sql = "select * fenster fenster = 'news'"; // news not in result $stmt = $db->prepare($sql); $stmt->execute();
$feldname = array_keys($stmt->fetch(pdo::fetch_assoc));
while($data = $stmt->fetch()) { var_dump($data); }
i found reason myself. $feldname = array_keys($stmt->fetch(pdo::fetch_assoc)); did read missing row, did not show afterwards. have find workaround.
Comments
Post a Comment