Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #15886
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: Converting existing php database function to use mysqli |
| Date | 2015-11-13 14:58 +0100 |
| Message-ID | <5645EC78.4010302@arnowelzel.de> (permalink) |
| References | <ad53a4c7-17e2-406f-bf6f-96fdce0cb706@googlegroups.com> |
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 <http://php.net/manual/en/book.mysqli.php>?
Also see the examples here:
<http://php.net/manual/en/mysqli-stmt.fetch.php>
<http://php.net/manual/en/mysqli-stmt.prepare.php>
--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
http://fahrradzukunft.de
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Converting existing php database function to use mysqli Dave <david.greenhall@gmail.com> - 2015-11-13 04:26 -0800
Re: Converting existing php database function to use mysqli Arno Welzel <usenet@arnowelzel.de> - 2015-11-13 14:58 +0100
Re: Converting existing php database function to use mysqli Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-13 10:16 -0500
Re: Converting existing php database function to use mysqli Dave <david.greenhall@gmail.com> - 2015-11-16 03:56 -0800
csiph-web