MySQL Forums
Forum List  »  German

php: von mysql zu PDO wechseln
Posted by: Toni Reiner
Date: November 24, 2018 04:38AM

hallo, ich update gerade von "mysql" zu pdo und komme bei 3 funktionen nicht wirklich weiter, hier mal das Original :

$resultGesamt=@mysql_query("SELECT COUNT(*) AS menge FROM tabelle");
$Eintraege=@mysql_result($resultGesamt,0,"menge");
while($row=@mysql_fetch_row($result))

das habe ich jetzt geändert, ist das so richtig? und : Die zeile mit $Eintraege weiß ich nicht wie ich das umschreiben muss :

$stmt=$pdo->prepare("SELECT COUNT(*) AS menge FROM tipps");
$stmt->execute();
$resultGesamt=$stmt->fetchAll();
$Eintraege=@mysql_result($resultGesamt,0,"menge");

Options: ReplyQuote


Subject
Views
Written By
Posted
php: von mysql zu PDO wechseln
614
November 24, 2018 04:38AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.