Below is some PHP code I've written, the problem occurs when it is used for num_of_rows () It just does not seem to work and why can not I understand?
& lt ;? Php try {$ divMon_ID = array (); $ DivMon_Position = array (); $ DivMon_Width = array (); $ DivMon_Div = array (); $ Db = new PDO ('sqlite: db / EVENTS.sqlite'); $ Result_mon = $ db- & gt; Query ('SELECT * FROM Monday'); $ Total rows = mysql_num_rows ($ result_mon); // $ ($ counter = 1; $ counter = lt; $ counter = = 1) // {div id = "event_1" style = "position: full; left: 0px; top: - 39px; width: 100px; font-family: aerial, helvetica, without-serif; font-size: small; border: 2px blue solid; height: 93px "& gt; // $ divMon_ID [] = $ line ['id']; // $ divMon_Position [] = $ line ['Genesis']; // $ divMon_P [] = $ line ['status']; //}} hold (PDOException $ e) {print 'exception:'. $ E- & gt; GetMessage (); }
?>
I know that this is "$ totalRows = mysql_num_rows ($ result_mon);" Statement because when I comment it out, the page may load
thanks.
">
You can not use mysql_num_rows with PED
>
Comments
Post a Comment