Reply to New Question about SQL with a variable

Your name:

Reply:


Posted by Kees Boer on 06/26/05 08:40

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.php
on line 14

What is the problem?

Thanks!

Kees

[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

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