Welcome Guest, Not a member yet? Register   Sign In
num_rows() always return a -1 value after query in db2 database
#11

[eluser]kurucu[/eluser]
How did you solve the problem in the end then? What did you change?
#12

[eluser]mhel_dc[/eluser]
[quote author="kurucu" date="1254249635"]How did you solve the problem in the end then? What did you change?[/quote]

I did something that I should have done from the start... since num_rows() is allegedly not supported in db2 odbc... instead of using num_rows I used result_array....

Where :

$qry = "Select Count(*) as rowcount from WARCOD# Where MSOSAG = '". $socode ."'";
$dbresult = $this->db->query($qry);

foreach($dbresult->result_array() as $row) {
$rowcount = $row['rowcount'];
}

Now, I can handle everthing... without editing the core driver itself. Big Grin
#13

[eluser]Unknown[/eluser]
try this...

if(count($dbresult->result()) <= 0) {
$dboutput = ‘’;
}

jim_r0x




Theme © iAndrew 2016 - Forum software by © MyBB