Reply to Re: connecting MySQL and PHP

Your name:

Reply:


Posted by - on 05/18/06 20:59

Am 17 May 2006 14:03:56 -0700 schrieb c.wrinn@gmail.com:

> I'm having the same problem, only on Apache 2.
>
> PHPMyAdmin works fine, so I know the three are communicating, but my
> scripts seem to do nothing, or at least output nothing.
>
> My test script:
>
> <html>
> <head>
>
> </head>
> <body>
>
> <?
> $mysql = mysql_connect("localhost","cwrinn","password") or die('Unable
> to Authenticate to ODBC'.mysql_error());
> mysql_select_db(snapon_dev, $mysql) or die('Error Selecting
> Database'.mysql_error());
> $result = mysql_query("select * from branch limit 0,30", $mysql) or
> die('Error querying database'.mysql_error());
>
> while ($row = mysql_fetch_row($result))
> {
> for ($i=0; $i<mysql_num_fields($result); $i++)
> echo $row[$i] . " ";
>
> echo "\n";
> }
> mysql_close($connection);
> ?>
> </body>
> </html>
>
>
> I get no error message from my die() functions, no errors in my php
> error_log. display_errors = On. Is there something I am missing?


Try
mysql_select_db("snapon_dev", $mysql)
instead of mysql_select_db("snapon_dev", $mysql)
(regrad the quotes)

or what is snapon_dev doing? A function?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация