I am developing a simple situation where I would like to show an HTML code, if only the total number of rows from a record set is The HTML content is not appearing more than Update: I find that I found and resolved the problem: D I should not use the total amount but fetch_array Or 1 , what could be the best bet option?
mysql_select_db ($ database_connection, $ connection); $ Query_user = sprintf ("Choose from users WHERE id =% s", GetSQLValueString ($ colname_user, "int")); $ User = mysql_query ($ query_user, $ connection) or die (mysql_error ()); $ Row_user = mysql_fetch_assoc ($ user); $ Total Rows_user = mysql_num_rows ($ user); & Lt ;? Php if ($ totalRows_user> 1) {? & Gt; & Lt; A href = "excluiru.php? Id = & lt ;? php echo $ row_user ['id'] ;; & gt; & Gt; & Lt; Img src = "imagens / delete.png" alt = "remover" onClick = "Confirm Return ('Do you really want to delete this user?');" / & Gt; & Lt; / A & gt; Delete user & lt ;? Php}? & Gt;
mysql_num_rows ($ user); giving value to zero all the time is there any other way to count?
& lt; Php $ isExist = mysql_query ("Select COUNT (ID) from users"); $ R = mysql_fetch_array ($ is eXIST); If ($ r ['COUNT (id)']> 1) {? & Gt;
if ($ totalRows_user> = 1)
No comments:
Post a Comment