double entry php query

I’ve checked, and this syntax will let you set it back, and you could
do this with a button or a link:

function restore(elm){
	$(elm).replace(window.backup);
	delete window.backup;
	$(elm)selectedIndex = 0;
}

Then add this button in after the text element when you are putting
the text field into the page:

<button onclick="restore('picker')" value="picker" />

What would be even cooler would be if you were to use a
Timed.Observer to watch the form and set this back if any of the
existing values was typed in. I had a quick fool with this, and hit a
bunch of errors. My JavaScript Fu is too weak…

Walter

On Mar 29, 2008, at 11:21 AM, DeltaDave wrote:

Thanks Walter I will have a play with

window.backup = $('foo').replace('<input type=............

And I will let you know how I get on.

David


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks Walter and Mike for your help with this but I have another question.

I want to display my results in alphabetical order. I have a field ‘ID’ that will be used for this but I am not sure how/where to insert the ‘order by’ instruction into the code that I have

$query = "select * from sttasources where ".$searchtype." like '%".$searchterm."%'";
$result = mysql_query($query);

$num_results = mysql_num_rows($result);
echo '<p class="result14"><span class="body14VBG">Number of Members found: '.$num_results.'</span></p>'; 



 for ($i=0; $i <$num_results; $i++)
 {
 $row = mysql_fetch_array($result);
 
 echo '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=5 COLSPAN=2>';
 echo '<tr>';
 echo '<td WIDTH=100 VALIGN=BOTTOM HEIGHT=12>';
 echo '<p class="body12V">'.($i+1).':  ';

etc. etc.


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Guys

Its OK - I got it sussed

Changed

$query = "select * from sttasources where ".$searchtype." like '%".$searchterm."%'";
$result = mysql_query($query);

to

  $query = "select * from sttasources where ".$searchtype." like '%".$searchterm."%' order by ID";
  $result = mysql_query($query);

And that seems to have done the trick.

David


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options