Skip to main content
Harm_Millaard
Inspiring
July 7, 2011
Question

Basic help with radio buttons and functions

  • July 7, 2011
  • 1 reply
  • 1206 views

I have a page, http://ppbm5.com/DB-PPBM5-3.php

which contains several radio button groups in tabbed panels. I can use the alert function to display the clicked button to see the value of the selected button.

I need to use that value to create a WHERE statement to requery a mySQL database in a real-time manner.

For instance:

When clicking on 'Asus' in the Manufacturer panel, I need to modify the query to:

$new_query = $old_query . "Manufacturer LIKE " .  "the variable now shown as Asus" . "ORDER BY Total, RPI ASC"

and then:

$Result = mysql_query( $new_query, $mysql)

How do I make this work?

I want to have a situation where the database is requeried everytime a radio button is clicked and updated in real time.

This topic has been closed for replies.

1 reply

July 7, 2011

You have already posted this question several times and a solution was provided, but you said you were unsuccessful. You did not express desire to pursue the solution and instead decided to attempt your own method. It's useless for others to provide solutions if you do not use them.

http://forums.adobe.com/thread/871475

best,

Shocker

Harm_Millaard
Inspiring
July 7, 2011

Can't create a Spry data set.

There is no way I can get it to work:

Followed the instruction videos step by step, but no way does it work. So the solution provided was not a solution at all. Merely a suggestion to look at alternative approaches which did not work out.

If it does not work, you have to follow other roads.

Harm_Millaard
Inspiring
July 8, 2011

Hello friend,

http://www.millcon.nl/Harm/Personal_data.xml has an error message that says

error on line 21 at column 14: error parsing attribute name

Below is a rendering of the page up to the first error.


Line 21 with the error is:

<Date & Time>2011-03-27 12:34:52</Date & Time>

Date & Time is not a preferred method for valid xml tag naming convention. Ideally you would have lowercase, no spaces, and no special characters ie date_and_time

Fix that for all tags and you should be able to create dataSet. Let us know if you have any other problems.

best,

Shocker


Thanks a lot for that tip about the field names. I changed them a bit, removing blanks and replacing them with underscores and I got the data set in order. Huge progress from my point of view. Couple of things still need tidying up before I can move on to the queries.

1. What code can I delete now on the page? It looks to me that first the SQL data get loaded and then the Spry data set. It looks to me like doing it twice. BTW I have updated the .html file to reflect todays work.

2. What can I do to prevent the short display of all the radio buttons when loading the page?

3. When I sort on a certain column, is there any way to sort the resulting sequence (with ties) on a second column? Say I'm sorting on CPU, how can I sort on a second column like rank, so I can see all the "X" CPU's ordered by their Rank? Rank will always be the second column to sort on.

Then of course the major work is how do I get the string values, now displayed in alert boxes into strings for my WHERE statements?