close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Data Assist Recordset MySQL Error when try to expand

Thread began 1/15/2012 9:15 pm by toni272059 | Last modified 1/16/2012 9:57 pm by toni272059 | 2257 views | 7 replies

toni272059

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);
}
}
?>

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...