close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Invalid variables in recordset

Thread began 7/08/2009 12:41 am by johnlanglois | Last modified 7/09/2009 12:22 pm by johnlanglois | 1829 views | 6 replies |

johnlanglois

Invalid variables in recordset

I had hoped that this might be the product that breaks my three-year long cycle of WA products that never work straight out of the gate. Alas, they are using us as beta testers again.

This product is much worse in terms of poor documentation and examples for a real world setting, such as a separate testing server, than previous products.

The index.php file in cms100\admin\index.php reports that content is an invalid variable because it's not used in the SQL and that content_id has no run time value.

Should I just ignore these warnings?

Sign in to reply to this post

Ray BorduinWebAssist

When and where do you get those warnings? I don't think they should be ignored. Please explain more fully so I can understand what you are talking about.

Sign in to reply to this post

johnlanglois

Originally Said By: Ray Borduin
  When and where do you get those warnings? I don't think they should be ignored. Please explain more fully so I can understand what you are talking about.  



Sure. Here's the code from index.php under admin that is causing the error.

<?php
// RepeatSelectionCounter_2 Begin Loop
$RepeatSelectionCounter_2_IterationsRemaining = $RepeatSelectionCounter_2_Iterations;
while($RepeatSelectionCounter_2_IterationsRemaining--){
if($RepeatSelectionCounterBasedLooping_2 || $row_contenthistory){
?>
<div id="leftPod<?php echo $RepeatSelectionCounter_2; ?>" class="leftPod">
Date: <?php echo date("m/d/Y", $row_contenthistory['HistoryDate']); ?><br />
Page: <?php echo $row_contenthistory['HistoryGroup']; ?><br />
Area: <?php echo $row_contenthistory['HistoryReference']; ?><br />
<?php
$content_id_Actions = "-1";
if (isset($content_id)) {
$content_id_Actions = (get_magic_quotes_gpc()) ? $content_id : addslashes($content_id);
}
mysql_select_db($database_TestingServer, $TestingServer);
$query_Actions = sprintf("SELECT * FROM contenthistory WHERE contenthistory.HistoryContentID = %s", GetSQLValueString($content_id_Actions, "int"));
$Actions = mysql_query($query_Actions, $TestingServer) or die(mysql_error());
$row_Actions = mysql_fetch_assoc($Actions);
$totalRows_Actions = mysql_num_rows($Actions);

mysql_select_db($database_localhost, $localhost);
$query_ContentActions = sprintf("SELECT * FROM contents WHERE contents.ContentID = %s", GetSQLValueString($row_contenthistory['HistoryContentID'], "int"));
$ContentActions = mysql_query($query_ContentActions, $localhost) or die(mysql_error());
$row_ContentActions = mysql_fetch_assoc($ContentActions);
$totalRows_ContentActions = mysql_num_rows($ContentActions);
?>
Action: <?php if($totalRows_Actions > 1 && $totalRows_ContentActions > 0 ) { ?>Updated
<?php } else if ($totalRows_ContentActions == 0) { ?>Deleted
<?php } else { ?>Inserted<?php } ?><br />
<?php if ($totalRows_ContentActions > 0) { ?>
<span style="margin-left:95px;">
<a href="contents_detail.php?ContentID=<?php echo $row_contenthistory['HistoryContentID']; ?>" style="color:#004899;" title="View">View Content</a>
</span>
<?php } else { ?><span style="display:block; height:15px;"></span><?php } ?>
</div>
<?php
} // RepeatSelectionCounter_2 Begin Alternate Content
else{
?>
<?php } // RepeatSelectionCounter_2 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_2 && $RepeatSelectionCounter_2_IterationsRemaining != 0){
if(!$row_contenthistory && $RepeatSelectionCounter_2_Iterations == -1){$RepeatSelectionCounter_2_IterationsRemaining = 0;}
$row_contenthistory = mysql_fetch_assoc($contenthistory);
}
$RepeatSelectionCounter_2++;
} // RepeatSelectionCounter_2 End Loop
?>
Sign in to reply to this post

Ray BorduinWebAssist

Does it give an error line number?

Sign in to reply to this post

johnlanglois

Line Number

Originally Said By: Ray Borduin
  Does it give an error line number?  



Assuming the page didn't change things much from the original, you should find the offending code in lines 193-207.

Thanks.

Sign in to reply to this post

Ray BorduinWebAssist

Please post a support incident including the entire file and the full error message. I can't seem to spot the problem but I would be interested in researching it more.

Sign in to reply to this post

johnlanglois

Originally Said By: Ray Borduin
  Please post a support incident including the entire file and the full error message. I can't seem to spot the problem but I would be interested in researching it more.  



I have submitted a ticket, along with all the files in a zipped folder.

Initially, the problem seems to be set in motion because the record sets have lost the definition of their connections. Redefining the connection resolved the first two queries, but left others with undefined variables. Dreamweaver won't restore the connection until the undefined variables are addressed and I don't know what their run-time values were supposed to be.

It almost seems like the product is hard-wired to be in one and only one folder, which would be a really short-sighted way to write the code because of issues like testing server verses production server.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...