Jason explained how this is happening and why.
This is caused by a conflict in my column naming convention and how DW and DA deal with naming parameters. This could be explained better I am sure but that is the gist of it.
Because I use an underscore in my column names DW was giving me errors trying to save recordsets when DA would create parameters which conflict with my column names.
In short, if you get an error when using the Test button in the recordset that says:
ParamX is an invalid variable name; it does not appear in the SQL
Missing type for variable:ParamX
NOTE: where "X" is the column name
Chances are that you have underscores in your column names. This also can cause duplicate select statements to be created. Best practice is to use camelCase for file names (thanks Jason). But to fix this in your code just remove the underscore in the parameter like the example below where Figure_Id is my column name. DA created a parameter called: $ParamFigure_Id_WADAfigures and apparently the first underscore is the problem. So just remove all instances of the first underscore so it looks like this: $ParamFigureId_WADAfigures.
The code below was where the problem is. I removed the first underscore in all three places and it corrected my issue.
<?php
$ParamFigure_Id_WADAfigures = "-1";
if (isset($_GET['Figure_Id'])) {
$ParamFigure_Id_WADAfigures = (get_magic_quotes_gpc()) ? $_GET['Figure_Id'] : addslashes($_GET['Figure_Id']);
}
mysql_select_db($database_FIGURES, $FIGURES);
$query_WADAfigures = sprintf("SELECT Figure_Id, Figure_Name, Date_Stamp, Size, Figure_Added, Series_Id, Line_Id, Figure_Approve, Figure_Locked, Figure_Text, Figure_Text_Added, Figure_Text_Approved FROM figures WHERE Figure_Id = %s", GetSQLValueString($ParamFigure_Id_WADAfigures, "int"));
$WADAfigures = mysql_query($query_WADAfigures, $FIGURES) or die(mysql_error());
$row_WADAfigures = mysql_fetch_assoc($WADAfigures);
$totalRows_WADAfigures = mysql_num_rows($WADAfigures);?>
Hope this helps someone.
Cheers!