| Ankur Dave 2006-11-22, 3:56 am |
|
Just chk your phpinfo() is odbc supprt is ebable in that. ??
If not need to enable odbc settings in that.=0D
-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
@nkur d@ve || http://ullu.wordpress.com=0D
=0D
-----Original Message-----
From: Chris Carter [mailto:chandan9sharma@yahoo.com]=0D
Sent: Wednesday, November 22, 2006 10:57 AM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] simple issue
my code:
<html>
<body>
<?
$username=3D"chris";
$password=3D"carter";
$database=3D"chris_phpb1";
mysql_connect(localhost,$username,$passw
ord);
@mysql_select_db($database) or die( "Unable to select database");
$query=3D"SELECT * FROM phpbb_banlist";
$result=3Dmysql_query($query);
if (!$result)
{exit("Error in SQL");}
echo "<table><tr>";
echo "<th>Companyname</th>";
echo "<th>Contactname</th></tr>";
while (odbc_fetch_row($result))
{
$compname=3Dodbc_result($result,"CompanyName");
$conname=3Dodbc_result($result,"ContactName");
echo "<tr><td>$compname</td>";
echo "<td>$conname</td></tr>";
}
odbc_close($conn);
echo "</table>";
?>
</body>
</html>
My error:
Fatal error: Call to undefined function: odbc_fetch_row() in
/home/chandan/public_html/deb.php on line 19
Companyname Contactname
Also .. I am trying this live on cPanel compiler coz I could not install
the
PHP thing on my localhost. I have apache-tomcat-5.5.17 which works
perfectly
with jsp files but I do not understand what does it take to run a php
using
apache.
chris smith-9 wrote:
>=0D
> Chris Carter wrote:
to[color=darkred]
me[color=darkred]
some[color=darkred]
>=0D
> There are hundreds of mysql + php tutorials on the 'net - do a search
in=0D
> your preferred search engine.
>=0D
> If you *still* can't work it out post a sample of the code you're
trying=0D
> to use and the errors you get.
>=0D
> --=0D
> Postgresql & php tutorials
> http://www.designmagick.com/
>=0D
> --=0D
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>=0D
>=0D
>=0D
--=0D
View this message in context:
http://www.nabble.com/simple-issue-...9.html#a7485434
Sent from the Php - Database mailing list archive at Nabble.com.
--=0D
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
The information contained in, or attached to, this e-mail, contains=
confidential information and is intended solely for the use of the=
individual or entity to whom they are addressed and is subject to legal=
privilege. If you have received this e-mail in error you should notify the=
sender immediately by reply e-mail, delete the message from your system=
and notify your system manager. Please do not copy it for any purpose, or=
disclose its contents to any other person. The views or opinions presented=
in this e-mail are solely those of the author and do not necessarily=
represent those of the company. The recipient should check this e-mail and=
any attachments for the presence of viruses. The company accepts no=
liability for any damage caused, directly or indirectly, by any virus=
transmitted in this email.
www.aztecsoft.com
|