You are here: Re: New Question about SQL with a variable « All PHP « IT news, forums, messages
Re: New Question about SQL with a variable

Posted by Simon Bridgewater on 06/26/05 09:34

Have you tried executing this sql statement from mysqladmin or similar. Just
to see if you get a result .


"Kees Boer" <keesboer@integrity-computing.net> wrote in message
news:Hdrve.68963$gc6.64748@okepread04...
> Hi, I've got a little bug, which I'm having a hard time debugging. It's
> probably in the syntax. This is the code:
>
> <?php
>
> $var_film = 'filmbigfish';
>
> // connect to mysql_server
> $mysqllink = mysql_connect( "localhost", "userid", "somepw" );
> // select database to use
> mysql_select_db( "kboer" );
>
> // primary table that directory uses
> $table = "films";
> $qresult = mysql_query( "SELECT * FROM `films` WHERE `d_thisfilm` =
> `$var_film` " );
>
> $row = mysql_fetch_assoc($qresult);
>
> ?>
>
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
>
> <body bgcolor="#FFFFFF" text="#000000">
>
> Everything works!
>
> </body>
> </html>
>
> I'm getting the following error.
>
> Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL
result
> resource in
>
/home/kboer/positive-entertainment.com/public_html/films/pages/resultlink.ph
p
> on line 14
>
> What is the problem?
>
> Thanks!
>
> Kees
>
>
>

 

Navigation:

[Reply to this 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

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