[snip]
172: $q = $this->DB["cms"]->prepare("SELECT t.Extension FROM Site_Mime as m,Type as t WHERE m.SNr=? && m.TNr=t.Nr");
173: $q->bind_param("i",$this->Site["Nr"]);
174: $q->execute();
175: $q->store_result();
[/snip]


I've got a very serious problem in big class, but these two lines are probably the origin if my problem:
$this->DB["CMS"] is a valid mysqli_connection
$this->Site["Nr"] is a number - in the current test-case it is 3
I've also checked the tables. There is a row with SNr=3 and TNr=2 in Site_Mime, and there is a row in the table Type with Nr=2.


So I would expect to get at least one row as a result of this query, but $q->num_rows has only the value ""

Then I tried simply to add ' on both sides of the ? but it got only ('?' instead of ?)weird: Warning: mysqli_stmt::bind_param() [function.bind-param.html]: Number of variables doesn't match number of parameters in prepared statement in C:\Programme\Apache Group\Apache2\htdocs\cms\lib\cms\site.class.php on line 173

has anyone an idea of what is wrong there?
is it possible that this is a bug?

thx for helping ;)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to