Jump to content

Query Problem


jenniferG

Recommended Posts

The below script gives us a query error in Red below-CAMERAMODEL  is certainly

in  TABLE  SIPRODUCTTABLE

---------------------------------------------------------------------------------------

<?php

include 'mysql_connect.php';

$_REQUEST['CAMERAMODEL']='SI-1M90-FT';

if (isset($_REQUEST['CAMERAMODEL'])){

$CAMERAMODEL=$_REQUEST['CAMERAMODEL'];

$MSRPQUERY="SELECT MSRP FROM SIPRODUCTTABLE WHERE CAMERAMODEL=$CAMERAMODEL";

$FIND=mysql_query($MSRPQUERY) or die('Cannot get MSRP' . mysql_error());

        if ($ROW=mysql_fetch_array($FIND)){$MSRP=trim($ROW['MSRP']);}

print $MSRP;

exit;

}else {print 'Camera Field Not Sent';exit;}

?>

//Cannot get MSRPUnknown column 'SI' in 'where clause'

 

Thanks,

 

NatalieG

 

 

Link to comment
https://forums.phpfreaks.com/topic/67129-query-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.