Wrox Programmer Forums
|
BOOK: Dreamweaver MX: PHP Web Development
This is the forum to discuss the Wrox book Dreamweaver MX: PHP Web Development by Gareth Downes-Powell, Tim Green, Bruno Mairlot; ISBN: 9780764543876
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Dreamweaver MX: PHP Web Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 15th, 2004, 05:04 AM
Registered User
 
Join Date: Nov 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Another Mistake (in Search System)...Is it me?

Hi People,

I am trying to build the search system described in Chapter 8 and when I get to the point where I need to add the variables (bComp,<,$bComp) I get the following error when I click OK (the code isn't added to the page):

"bComp is an invalid variable name; it does not appear in the SQL"

Can someone pleeeeeeeease help. I am so frustrated and don't know if it is me or the *&^( book!


<?php require_once('Connections/rsSearch.php'); ?>

<?php
    if($_POST_VARS["bed_option"] == "Less than")
    {
        $bComp = "<";
    }
    else if($_POST_VARS["bed_option"] == "More than")
    {
        $bComp = ">";
    }
    else
    {
        $bComp = "=";
    }
?>

<?php
mysql_select_db($database_rsSearch, $rsSearch);
$query_Recordset1 = "SELECT ID, price, bed FROM room";
$Recordset1 = mysql_query($query_Recordset1, $rsSearch) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>








Similar Threads
Thread Thread Starter Forum Replies Last Post
Did you find a mistake? nzakas BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 47 July 18th, 2006 05:51 PM
mistake in code yami56 Access 3 February 24th, 2005 04:04 PM
mistake in my topics zakarya_hazara Classic ASP Basics 1 October 9th, 2004 02:49 AM
Dangerous mistake revinchalil SQL Server 2000 4 February 4th, 2004 12:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.