List Info

Thread: note 69997 added to function.odbc-num-rows




note 69997 added to function.odbc-num-rows
user name
2006-09-29 06:42:42
//I did it my way:
//---------------

<?php
			
$conn = odbc_connect ('odbc_name', 'user_name', 'password')
or die ('Could NOT connect to ODBC database!');

$query =  ('select * from table_name..column_name')
$result = odbc_exec($conn,$query);

if (odbc_error())
{
   echo odbc_errormsg($conn);
}
		
$number_of_rows = 0;
while (odbc_fetch_into($result, &$row))
{
   print $row[0]."</br>";
   $number_of_rows++;
}
			
print "</br>";
print  $number_of_rows;

odbc_free_result($result);
odbc_close($conn);

?>
----
Server IP: 202.157.183.147
Probable Submitter: 202.75.160.254 (proxied: 10.233.68.245)
----
Manual Page -- http://www.php.net/manual/en/function.odbc-num-rows.php
Edit        -- https://master
.php.net/note/edit/69997
Del: integrated  -- h
ttps://master.php.net/note/delete/69997/integrated
Del: useless     -- http
s://master.php.net/note/delete/69997/useless
Del: bad code    -- htt
ps://master.php.net/note/delete/69997/bad+code
Del: spam        -- https:/
/master.php.net/note/delete/69997/spam
Del: non-english -- 
https://master.php.net/note/delete/69997/non-english
Del: in docs     -- http
s://master.php.net/note/delete/69997/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/69997
Reject      -- https://mast
er.php.net/note/reject/69997
Search      -- https://
master.php.net/manage/user-notes.php

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

note 69997 deleted from function.odbc-num-rows by bobby
user name
2006-09-29 15:18:07
Note Submitter: Miroslav
Reason: bad code

----

//I did it my way:
//---------------

<?php
			
$conn = odbc_connect ('odbc_name', 'user_name', 'password')
or die ('Could NOT connect to ODBC database!');

$query =  ('select * from table_name..column_name')
$result = odbc_exec($conn,$query);

if (odbc_error())
{
   echo odbc_errormsg($conn);
}
		
$number_of_rows = 0;
while (odbc_fetch_into($result, &$row))
{
   print $row[0]."</br>";
   $number_of_rows++;
}
			
print "</br>";
print  $number_of_rows;

odbc_free_result($result);
odbc_close($conn);

?>

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

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )