[ic] sql question

Cameron B. Prince cameron@akopia.com
Tue, 31 Oct 2000 19:48:35 -0600


The code that was replaced and commented out below is compatible with SQL,
but not the SQL Statement Module. So if you configured mysql originally, it
would work. But those who use GDBM's would receive an error and the function
wouldn't work.

The statement module doesn't support functions like count(*), sum(*), etc.
These function fine with MySQL though.

Your message doesn't indicate whether you use GDBM or MySQL. Your query may
be too complex for SQL Statement if you are using GDBMs. If you are using
MySQL, you might try your query from the MySQL prompt. If you get the proper
results there, you should also be able to get them inside Interchange.

Good luck,

Cameron

-----Original Message-----
From: interchange-users-admin@minivend.com
[mailto:interchange-users-admin@minivend.com]On Behalf Of
MhsapoA@netscape.net
Sent: Tuesday, October 31, 2000 6:28 PM
To: interchange-users@minivend.com
Subject: [ic] sql question


Hello y'all,

I'm getting wrong return values when I use a select statement with a logical
AND. What could be the problem?

Table contains:
fields
make=yamaha,honda,suzuki
model=yamaha->250,350,550
year=250->1991,1992,1993,1994 etc

INPUT VALUE => make=yamaha,model=250,year=1994

RECEIVED the WRONG OUTPUT = yamaha,different model, and all year of 1991.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[loop search="
 ra=yes
 st=db
 sq=select * from table where make = '[value make]' and model = '[value
model]' and year = '[value year]'
 ml=1000
"]
                make=<font size=2 color=red>[loop-data table make]</font>,
                model=<font size=2 color=red>[loop-data table model]</font>,
                year=<font size=2 color=red>[loop-data table year]</font>,
[/loop]
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

If this query is incompatible with SQL, What about HAVING, ORDER BY, SUM are
also incompatible?
Part remove from ship_addresses.html
+++++++++++++++++++++++++++++++++++++++++++++++
Removed 10/12/00 - Cameron B. Prince
Incompatible with GDBM and SQL::Statement Module
[query
        list=1
        st=db
        sql=|
                select count(*) from ship_addresses
                where username = '[data session username]'
        |
]
                        [seti addresses][sql-code][/seti]
[/query]
++++++++++++++++++++++++++++++++++++

Thanks,
Mauricio

_______________________________________________
Interchange-users mailing list
Interchange-users@www.minivend.com
http://www.minivend.com/mailman/listinfo/interchange-users