I have a problem trying to get the number of rows from a prepared statement query in php, my query looks as follows : And I basically just want to say that no result results were shown "no results returned" Can anyone help? You must firstly $ DBH = getDBH (); $ Stmt = $ DBH- & gt; Ready ("list list WHERE tag =" from selection list? "); $ Stmt- & gt; Bind_param ("s", $ tag); $ Stmt- & gt; Executed (); $ Stmt- & gt; Bind_result ($ info);
$ statement-> Using store_result () will use your code:
$ DBH = getDBH (); $ Stmt = $ DBH- & gt; Ready ("list list WHERE tag =" from selection list? "); $ Stmt- & gt; Bind_param ("s", $ tag); $ Stmt- & gt; Executed (); $ Stmt- & gt; Store_result (); $ Num_rows = $ stmt-> Num_rows; $ Stmt- & gt; Bind_result ($ info);
Comments
Post a Comment