[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
[mv] sql query gives "Bad SQL" error
****** message to minivend-users from "Scott Lewis" <lists@balticave.com> ******
hi,
i'm new to minivend and having a hard time integrating it with
mysql. i have a test table and when the catalog starts the table
is successfully read in from a text file and the mysql table
created. i can read data from the table with the [data] and
[loop search] tags, but i can't make [query] work.
the query works from the mysql client. and it works from a perl
program using the same DSN. is this a bug with the [query]
tag? i am using MiniVend 4.01, which was supposed to fix a
bug in [query].
or, is there another tag i can use to get data from an
arbitrary SQL statement?
any help would be greatly appreciated.
-scott
lists@balticave.com
these are the entries in the catalog cfg file:
Database testa testa.txt dbi:mysql:store_db
Database testa USER [my username]
Database testa PASS [my password]
Database testa DELIMITER TAB
Database testa KEY code
Database testa COLUMN_DEF "code=char(16) NOT
NULL PRIMARY KEY"
Database testa COLUMN_DEF "name=char(128)"
this tag fails with an error of "Bad SQL":
[query sql="select code, name from testa"]
[sql-data testa code]<BR>
[/query]
this one works:
[data table="testa"
field="name"
key="B"]
this one works also:
[loop search="
ra=yes
fi=testa
rf=code,name
"]
[loop-data testa name]
[/loop]
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list