Forums
This topic is locked
insert/edit record using multiple select menu
03 Feb 2003 19:26:10 A D posted:
Can anyone explain how to do this:webforums.macromedia.com/dreamweaver/messageview.cfm?catid=263&threadid=501741&highlight_key=y&keyword1=multiple
via PHP? Thx!
Replies
Replied 03 Feb 2003 19:31:16
03 Feb 2003 19:31:16 A D replied:
whoops! just found a similar post .. thx anyways
Replied 05 Feb 2003 19:19:06
05 Feb 2003 19:19:06 A D replied:
after a few trial and error sessions I was able to insert multiple selections from a dynamic menu as an imploded array. : )
OK ... now this has transformed into an Advanced Recordset question for Dreamweaver MX. : (
My goal is to have a <b>news release</b> that will list related news releases as links. I'm able to get one news release link to show up, but if I have more than one I get a SQL error. Here's my sample table structure:
id
title
related_stories
link
I've created one recordset for a news release and another using the same table to show the related stories.
<pre id=code><font face=courier size=2 id=code>
<?php
$colname_rsNR = "1";
if (isset($HTTP_GET_VARS['id'])) {
$colname_rsNR = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['id'] : addslashes($HTTP_GET_VARS['id']);
}
mysql_select_db($database_connE, $connE);
$query_rsNR = sprintf("SELECT * FROM implode_explode WHERE id = %s", $colname_rsNR);
$rsNR = mysql_query($query_rsNR, $connE) or die(mysql_error());
$row_rsNR = mysql_fetch_assoc($rsNR);
$totalRows_rsNR = mysql_num_rows($rsNR);
$varFSID_rsFS = "0";
if (isset($row_rsNR['fact_sheets'])) {
$varFSID_rsFS = (get_magic_quotes_gpc()) ? $row_rsNR['fact_sheets'] : addslashes($row_rsNR['fact_sheets']);
}
mysql_select_db($database_connE, $connE);
$query_rsFS = sprintf("SELECT * FROM implode_explode WHERE id = %s", $varFSID_rsFS);
$rsFS = mysql_query($query_rsFS, $connE) or die(mysql_error());
$row_rsFS = mysql_fetch_assoc($rsFS);
$totalRows_rsFS = mysql_num_rows($rsFS);
?>
</font id=code></pre id=code>
Is there another way to compare two fields that exist in the same table? Thx!
OK ... now this has transformed into an Advanced Recordset question for Dreamweaver MX. : (
My goal is to have a <b>news release</b> that will list related news releases as links. I'm able to get one news release link to show up, but if I have more than one I get a SQL error. Here's my sample table structure:
id
title
related_stories
link
I've created one recordset for a news release and another using the same table to show the related stories.
<pre id=code><font face=courier size=2 id=code>
<?php
$colname_rsNR = "1";
if (isset($HTTP_GET_VARS['id'])) {
$colname_rsNR = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['id'] : addslashes($HTTP_GET_VARS['id']);
}
mysql_select_db($database_connE, $connE);
$query_rsNR = sprintf("SELECT * FROM implode_explode WHERE id = %s", $colname_rsNR);
$rsNR = mysql_query($query_rsNR, $connE) or die(mysql_error());
$row_rsNR = mysql_fetch_assoc($rsNR);
$totalRows_rsNR = mysql_num_rows($rsNR);
$varFSID_rsFS = "0";
if (isset($row_rsNR['fact_sheets'])) {
$varFSID_rsFS = (get_magic_quotes_gpc()) ? $row_rsNR['fact_sheets'] : addslashes($row_rsNR['fact_sheets']);
}
mysql_select_db($database_connE, $connE);
$query_rsFS = sprintf("SELECT * FROM implode_explode WHERE id = %s", $varFSID_rsFS);
$rsFS = mysql_query($query_rsFS, $connE) or die(mysql_error());
$row_rsFS = mysql_fetch_assoc($rsFS);
$totalRows_rsFS = mysql_num_rows($rsFS);
?>
</font id=code></pre id=code>
Is there another way to compare two fields that exist in the same table? Thx!