HighDots Forums  

swaping text between recordsets

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss swaping text between recordsets in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JustMeDavid
 
Posts: n/a

Default swaping text between recordsets - 07-12-2004 , 08:54 AM






Newbee Question, "idiots guide style answers please!"
Macromedia MX 2004, php <> MySql

in the database there is an soccer events table, one of these records will be
flagged as "main = Y"
I have a form with 2 recordsets
1 is the single "rs_main" record
2 is "rs_list" of all sports Events where "archived = N"
I have a table with rs_list.Title and a hidden field with rs_list.id
All that is working fine!.

But:
I want to create a 3rd select recordset and put it inside a function, so when
I click on the list, it gets the record for rs_list.id
Populates the rs_main.title, rs_main.description and rs_main.author.

1. How do i declare a function and where do I put the code ?
BLANK

2. do I need a 3rd recordset & form variable or can it just be coded somethin
like this fill the blanks please?
mysql_select_db($database_soccer, $soccer);
$query_rs_swap = sprintf("SELECT author, title, description FROM event WHERE
id = %s", "BLANK ??");
$rs_swap = mysql_query($query_rs_swap, $soccer) or die(mysql_error());
$row_rs_swap = mysql_fetch_assoc($rs_swap);
$totalRows_rs_swap = mysql_num_rows($rs_swap);

3. how do I then put the rs-swap.author "value" into the rs_main.author on the
form?
BLANK

4. then how do I action the click event to call the function?
BLANK

I know to some of you guys this is basic code, but it is a whole new language
to me!

Thanks in advance !
Dave


Reply With Quote
  #2  
Old   
JustMeDavid
 
Posts: n/a

Default Re: swaping text between recordsets - 07-12-2004 , 02:30 PM






I have tried several different things, cannot find a tutorial

Can anyone help please!

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.