gettingstarted
[Top] [All Lists]

Re: Dependable PopupMenus with MySQL problem

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Dependable PopupMenus with MySQL problem
From: Scriptdude <scriptdude at gmail dot com>
Date: Fri, 29 Apr 2005 09:17:55 +0200
Delivered-to: gettingstarted at lists dot realsoftware dot com
References: <9F493097D6CCD211B18F0008C7FA88CE0A4FBD0C at jnjausyexs1 dot ap dot jnj dot com>
POIDINGER, Michael [JJRAU] wrote:
I created 2 MySQL DatabaseQuery controls:

Query1:
SELECT make, make_id FROM makes

Query2:
SELECT model, model_id FROM models WHERE make_id = '%1'


Bindings:

Query1 :
Bind pmMakes with list data from Query1 results

Query2:
Bind Query2 parameter with string data from pmMakes RowTag Bind pmModels with list data from Query2 results

The first PopupMenu gets populated with the Makes, but the second Popupmenu stays empty. I attached the bind from Query1 to a EditField to see if the ID was returned and the EditField is nicely displaying the ID number, so the query works.

Am I doing something wrong?
_______________________________________________


Are you sure you want the % sign in there, and are you sure you want to bind
to the rowtag, and not something else?  is make_id in the DB a numeric, and
you are passing in (in query 2) a string instead? I use mysql extensively,
but hate bindings with a passion, so never use them.  Thus my questions may
be off base.

Mike

Thanks Mike,

I used the '%1' as a parameter because that's how the User Guide explained it. When I created the same thing with a PopupMenu & a ListBox it worked. So I tried to replace the listbox with another PopupMenu.

make_id is an INT (foreign key) and I tried to bind it to the same INT key of the makes table.

Is there an alternative for what I want to accomplish? (which is having 3-4 PopupMenu's being populated based on the value of the previous PopupMenu)

Dimitri
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>