Code: Select all
//Allready conected to database
$sql = "select * from users where user_id='4'";
$result = odbc_exec($dblink, $sql);
$row = odbc_fetch_array($result);
echo $row['name'];
//The above works properly with no problems what so ever
$sql = "select * from products where product_id='3'";
$result = odbc_exec($dblink, $sql); //Here I get the errorSecondly, as it states on the php.net website, odbc_num_rows works very poorly in many cases including mine, so what I did is simply use something along these lines
Code: Select all
$counter = 0;
while(odbc_fetch_row($result))
{
$counter++;
}
echo $counter;Thanks alot in advance