Database query builder not really a bug just not finished

Bill bill at bluewatermaritime.com
Wed Jul 21 14:42:01 EDT 2004




On 7/21/04 1:38 PM, "use-revolution-request at lists.runrev.com"
<use-revolution-request at lists.runrev.com> wrote:

> is anyone here using Database Query Builder on Rev 2.2.1? I am using it
> and using it to display the contents of a query in a nice listbox
> field. The query should return 3 rows (it does that on phpMyAdmin, the
> same query). It returns only one row on rev. Also I am making use of
> the arcane function revSetSQLOfQuery to change the parameter of the
> query on runtime. it is working for when I check the Database Query
> Builder, the query is the last one I set. Any clues here?  That appears
> a nasty bug...

The query builder and its nice show record function only works for one
record at a time. You can do this:

on mouseUp
  put first word of selectedtext of me into tshipID
  
  put "SELECT * FROM voyages WHERE shipID='" & \
      tshipID & "'" \
      into tSQLStatement
  
  revSetSQLOfQuery "Connect",tSQLStatement
end mouseUp

(sorry my example is not more generic -- my query builder query is called
"Connect") and then you will get a subset of your data but still only one
record will show at a time in the fields that are show a connection and
update data etc. Then you use buttons set to move to next record to see each
record from your query.

If you want to see a list of records like to put them in a pop-up or
something you don't use the query builder but instead do it manually (and
you can make a nice front end that mixes what the query builder does well
 with what you have to do manually).

Also try using CocoaMySQL instead of phpMyAdmin and you have more functions
and can look stuff up quickly (especially if you have a complex multi-table
database) while programming in RUNREV at the same time.




More information about the use-livecode mailing list