Hi Gert
This is a new table i have created.
I can perform queries on this table outside of the perl tags
successfully, both select and insert queries.
The page actually loops through a large form on the previous which has
a couple of 100 fields for various items these fields are numbered
1,2,3, etc. When it loops whrough it checks if it has a value inside
it and if it does it does an insert query.
for($i=1;$i<=$count;$i++) {
my $quantity = $CGI->{$i._quantity};
if ($quantity) {
my $sku = $CGI->{$i._sku};
my $description = $CGI->{$i._description};
my $price = $CGI->{$i._price};
my $weight = $CGI->{$i._weight};
my $group_text = $CGI->{$i._group_text};
my $group_selected = $CGI->{$i._group_selected};
my $category = $CGI->{$i._category};
my $group;
if ($group_text) {
$group = $group_text;
} else {
$group = $group_selected;
}
$sql = "INSERT INTO quote_items VALUES ('$code', '$project', '1n',
'$sku', '$description', '$quantity', '$price', '$weight', '$group',
'$category', '', '')";
my $ins = $Tag->query({
sql => $sql,
hashref => 'ins',
});
$code++;
}
}
Heres the code which may make it a bit clearer wqhta i am trying to do.
On 19/07/07, suppressed <suppressed> wrote:
> I am trying to use the query tag in perl however i receive the
> following error.
>
> table products: Query on table quote_items failed: no access for
> database quote_items at
> /var/www/vhosts/jobs.avunit.com/interchange/lib/Vend/Data.pm line
> 1055. Query was: INSERT INTO quote_items VALUES ('25', '10', '1',
> 'CONF-LAB-LABAUD', 'Audio Engineer. Standard day rate', '7', '195.00',
> '', 'Labour', '', '', '')
>
> I have looked at this and added the following bit to my perl opening
> tag so that it now has.
>
> [perl tables=quote_items]
>
> however i still get this error. How do i give this permission for
> interchange to place new items in this table.
- is this a new table, or an already existing table?
- have you been doing other queries on this table in other locations without problems?
- could you provide more context regarding the problem?
CU,
Gert
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users
_______________________________________________ interchange-users mailing list suppressed http://www.icdevgroup.org/mailman/listinfo/interchange-users
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.