I have tried changing the database table field names to use underscores, I have deleted files and started again with Data Assist. Everytime I have the same problem with the Recordset error. The latest error message is
MySQL Error#: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group, product_number, item_name, item_photo, item_desc, item_size, item_price F' at line 1
I have tried changing field names, field types.
Follows the latest sql file content and also the php at head of Details page
-- phpMyAdmin SQL Dump
-- version 2.11.7.1
-- www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 16, 2012 at 03:25 PM
-- Server version: 5.0.41
-- PHP Version: 5.2.6
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `boomerang-products`
--
-- --------------------------------------------------------
--
-- Table structure for table `boomerang-products-table`
--
CREATE TABLE `boomerang-products-table` (
`maincategory` varchar(55) NOT NULL,
`subcategory` varchar(55) NOT NULL,
`group` varchar(55) NOT NULL,
`item_id` int(10) unsigned NOT NULL auto_increment,
`product_number` varchar(25) NOT NULL,
`item_name` varchar(55) NOT NULL,
`item_photo` mediumblob NOT NULL,
`item_desc` text NOT NULL,
`item_size` varchar(55) default NULL,
`item_price` decimal(5,2) NOT NULL,
PRIMARY KEY (`item_id`),
UNIQUE KEY `product_number` (`product_number`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
--
-- Dumping data for table `boomerang-products-table`
--
<?php require_once('../Connections/Boomerang.php'); ?>
<?php require_once("../WA_DataAssist/WA_AppBuilder_PHP.php"); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
?><?php
if (!session_id()) session_start();
?>
<?php
$Paramitem_id_WADAboomerangproductstable = "-1";
if (isset($_GET['item_id'])) {
$Paramitem_id_WADAboomerangproductstable = (get_magic_quotes_gpc()) ? $_GET['item_id'] : addslashes($_GET['item_id']);
}
$ParamSessionitem_id_WADAboomerangproductstable = "-1";
if (isset($_SESSION['WADA_Insert_boomerangproductstable'])) {
$ParamSessionitem_id_WADAboomerangproductstable = (get_magic_quotes_gpc()) ? $_SESSION['WADA_Insert_boomerangproductstable'] : addslashes($_SESSION['WADA_Insert_boomerangproductstable']);
}
$Paramitem_id2_WADAboomerangproductstable = "-1";
if (isset($_GET['item_id'])) {
$Paramitem_id2_WADAboomerangproductstable = (get_magic_quotes_gpc()) ? $_GET['item_id'] : addslashes($_GET['item_id']);
}
mysql_select_db($database_Boomerang, $Boomerang);
$query_WADAboomerangproductstable = sprintf("SELECT item_id, subcategory, group, product_number, item_name, item_photo, item_desc, item_size, item_price FROM `boomerang-products-table` WHERE item_id = %s OR ( -1= %s AND item_id= %s)", GetSQLValueString($Paramitem_id_WADAboomerangproductstable, "int"),GetSQLValueString($Paramitem_id2_WADAboomerangproductstable, "int"),GetSQLValueString($ParamSessionitem_id_WADAboomerangproductstable, "int"));
$WADAboomerangproductstable = mysql_query($query_WADAboomerangproductstable, $Boomerang) or die(mysql_error());
$row_WADAboomerangproductstable = mysql_fetch_assoc($WADAboomerangproductstable);
$totalRows_WADAboomerangproductstable = mysql_num_rows($WADAboomerangproductstable);?>
<?php
// WA Application Builder Delete
if (isset($_POST["Delete_x"])) // Trigger
{
$WA_connection = $Boomerang;
$WA_table = "boomerang-products-table";
$WA_redirectURL = "boomerang_Results.php";
if (function_exists("rel2abs")) $WA_redirectURL = $WA_redirectURL?rel2abs($WA_redirectURL,dirname(__FILE__)):"";
$WA_keepQueryString = false;
$WA_fieldNamesStr = "item_id";
$WA_columnTypesStr = "none,none,NULL";
$WA_fieldValuesStr = "".((isset($_POST["WADADeleteRecordID"]))?$_POST["WADADeleteRecordID"]:"") ."";
$WA_comparisonStr = "=";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_comparisions = explode("|", $WA_comparisonStr);
$WA_connectionDB = $database_Boomerang;
mysql_select_db($WA_connectionDB, $WA_connection);
if (!session_id()) session_start();
$deleteParamsObj = WA_AB_generateWhereClause($WA_fieldNames, $WA_columns, $WA_fieldValues, $WA_comparisions);
$WA_Sql = "DELETE FROM `" . $WA_table . "` WHERE " . $deleteParamsObj->sqlWhereClause;
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
if ($WA_redirectURL != "") {
if ($WA_keepQueryString && $WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
$WA_redirectURL .= ((strpos($WA_redirectURL, '?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
}
header("Location: ".$WA_redirectURL);
}
}
?>