I have a script written in php and an trying to find the
alternative in coldfusion and don't seem to be getting anywhere, I
have googled and googled, it may just be I am looking in the wrong
place. Your help in greatly welcomed!
THis is the php version
$product_options=$row["product_options"];
$product_options=split(",",$product_options);
foreach($product_options as $assign_id)
{
//get info
$result=mysql_query("SELECT *FROM options_bot WHERE
assign_id='$assign_id'");
while($row=mysql_fetch_array($result))
{
$option_id=$row["option_id"];
$value_id=$row["value_id"];
$option_price=$row["option_price"];
$option_symbol=$row["option_symbol"];
if($option_symbol=="+")
{
$opt_price=$opt_price+$option_price;
}
if($option_symbol=="-")
{
$opt_price=$opt_price+$option_price;
}
//find the name of options and values
//get the name of the option
$result=mysql_query("SELECT * FROM options_top WHERE
option_id='$option_id'");
while($row=mysql_fetch_array($result))
{
$option_name=$row["option_name"];
}
//get the name of the value
$result=mysql_query("SELECT * FROM options_mid WHERE
value_id='$value_id'");
while($row=mysql_fetch_array($result))
{
$value_name=$row["value_name"];
}
echo"<b>$option_name :
</b>$value_name<br>";
$options=array($option_name,$value_name);
}
Here is what I have no far in Coldfusion
<cfset product_options=#product_options#>
<cfset assign_id=ListToArray(#product_options#, ",")>
<cfdump var="#assign_id#">
<cfquery name="optinfo" datasource="mydatabase">
SELECT * FROM options_bot WHERE assign_id='#assign_id#'
</cfquery>
I get this error message
Complex object types cannot be converted to simple values.
THank You Sooooo Much!