Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.php Subject: Re: Converting existing php database function to use mysqli Date: Fri, 13 Nov 2015 14:58:16 +0100 Lines: 39 Message-ID: <5645EC78.4010302@arnowelzel.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Trace: individual.net rxBBKiFBlYsXf5GUcIJw1QjbJ3l+Er12BKaYDnMOnu/RzO84fM Cancel-Lock: sha1:tUCh9OaTZgFaMP4L0g4DKl/Rb/o= X-Enigmail-Draft-Status: N1110 In-Reply-To: Xref: csiph.com comp.lang.php:15886 Am 2015-11-13 um 13:26 schrieb Dave: > I have inherited a website which uses a php database class and need > to convert it to use mysqli, but I am struggling with one of the functions. [...] > From what i can see, the new mysqli works a completely different way > and I can't seem to find a way to simply output a field based on the > numeric value given. > > the function is currently: > > function getResult($result, $cell){ > if(mysql_num_rows($result) !=0) { > $this->dbConnect(); > $sql = mysql_result($result, $cell); > $this->closeDatabase(); > } > else { > $sql ="No result found"; > } > return $sql; > } > > Hoping someone can point me in the right direction. Did your read ? Also see the examples here: -- Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de http://fahrradzukunft.de