On Dec 12, 2005, at 10:35 AM, Mark Wieder wrote:
Monday, December 12, 2005, 5:12:46 AM, you wrote:

put revDataFromQuery(,,myDB,"SELECT COUNT(*) FROM myTable") into myCount

And I want to see the result by using:

answer myCount

Well I get zero (0). The data in the table is gone after I execute that

Hmm, this works on my end. I tested on OS X.4 running MySQL 4.1. Not sure why you are losing all of your data. This seems really odd.

Can't tell you why your data has gone missing, but...

I don't think revDataFromQuery() is really what you want here. Try

put revExecuteSQL(myDB, "SELECT COUNT(*) FROM myTable") into myCount

or create a recordset and use revNumberOfRecords():

revQueryDatabase(myRS, "SELECT * from myTable") into myRS
put revNumberOfRecords(myRS) into myCount

revDataFromQuery should work correctly in this context since it will return the text of the result of the query which should be the number of records in the table. revExecuteSQL won't return the value Adam is after since it just executes the sql, no SELECT statements allowed.


--
Trevor DeVore
Blue Mango Multimedia
[EMAIL PROTECTED]


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to