You are here: Re: troubles with mdb2's numRows() function « PHP Programming Language « IT news, forums, messages
Re: troubles with mdb2's numRows() function

Posted by petersprc on 07/26/07 21:29

Wonder what happens if you do:

$db->loadModule('Extended');
$count = $db->extended->execParam('delete from auth where username = ?
limit 1', array('.$|meno.'), null);

echo "Delete $count records.";

On Jul 26, 7:31 am, Milan Krejci <r...@mail.cz> wrote:
> function odstran($jmeno) {
> $this->res=&$this->mdb2->query("DELETE FROM auth WHERE
> username='".$jmeno."' LIMIT 1");
> if (PEAR::isError($this->res)) die($this->res->getMessage());
> //var_dump($this->res);
> //echo $this->res->numRows();
> //if ($this->res->numRows()==1) echo ('<p>Uzivatel odstranen</p>');
> ////////////////////BUG ^^^
> }
>
> it should return 0 or 1 but it is NULL. the record has been deleted
> allright but numRows() doesn't return anything even if nothing has been
> deleted.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация