note 128083 added to function.mysql-result

From: Date: Wed, 04 Jan 2023 16:57:34 +0000
Subject: note 128083 added to function.mysql-result
Groups: php.notes 
Request: Send a blank email to php-notes+get-220039@lists.php.net to get a copy of this message
To replace a row count e.g. $querystring = "SELECT COUNT(*) FROM table WHERE column1 = 'EXAMPLE'"; $total_records = mysql_result(mysql_query($querystring,$connection),0); use mysqli_fetch_row : $querystring = "SELECT COUNT(*) FROM table WHERE column1 = 'EXAMPLE'"; $rowcount = mysqli_fetch_row(mysqli_query($connection,$querystring)); $total_records = $rowcount[0]; ---- Server IP: 45.112.84.4 Probable Submitter: 45.91.158.213 (proxied: 2.25.153.75) ---- Manual Page -- https://php.net/manual/en/function.mysql-result.php Edit -- https://main.php.net/note/edit/128083 Del: integrated -- https://main.php.net/note/delete/128083/integrated Del: useless -- https://main.php.net/note/delete/128083/useless Del: bad code -- https://main.php.net/note/delete/128083/bad+code Del: spam -- https://main.php.net/note/delete/128083/spam Del: non-english -- https://main.php.net/note/delete/128083/non-english Del: in docs -- https://main.php.net/note/delete/128083/in+docs Del: other reasons-- https://main.php.net/note/delete/128083 Reject -- https://main.php.net/note/reject/128083 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#220039) next »