Ask a Question related to Dreamweaver AppDev, Design and Development.
-
pporter #1
Showing a specific record from a recordset
Hi, I am trying to find a way of displaying a specific record (the latest one
entered by a user) from a recordset as opposed all of the records or just the
first record in a recordset. This is so the user can view what they have
entered, and only what they have entered. Do I need to pass specific parameters
or something? Can anyone explain what I need to do or direct me to a tutorial?
Thanks,
pporter Guest
-
Extracting specific record from XML
I'v created a SWF movie that imports an XML file and gets a variable from the ASP page that it's in. In the SWF, how do I display the XML record... -
how to go to a specific record
DB is mySQL I'm trying to display a schedule of events, and only want to display dates that had/have events scheduled. Considerations: 1)... -
Move to specific record
hii peeps, what i want to knowe is.. where i can find a extension fore: move to specifi record ore it exist..? greets Ej. -
Loading a recordset at the last record?
How can I do that? I have a table with record that are updated periodically through the day. I want a page that only loads the last record. How?... -
Dynamic dropdown not showing true recordset (PHP/MySQL)
Hi, This is a strange one - I have a recordset bound to my page, 'UCust' containing a list of customer names. It uses the DISTINCT SQL statement to... -
wee_elks #2
Re: Showing a specific record from a recordset
Why not have a dynamic table that displays the records the user has entered and sort it descending?
wee_elks Guest
-
pporter #3
Re: Showing a specific record from a recordset
Hi, yeah I was hoping to go down that road but when I create it I can only have
the dynamic table sitting on the same page that the user inputs their data. I
was hoping to have them click 'submit' and then go to a separate detailed page
that has the dynamic data. Any ideas?
pporter Guest
-
Clukey #4
Re: Showing a specific record from a recordset
You can create an id# manually for each record with javascript and a hidden field then in your recordset options sort the ID column in descending order
Clukey Guest
-
pporter #5
Re: Showing a specific record from a recordset
Hi Clukey,
Thank you so much for your help, that was exactly what I was after!
Does anyone know how to do any of the following?
1) I have set up some dynamic image regions in a table, and only want them to
display if there is an image in the recordset. However, when I set the 'show
region if recordset is not emptry' server behaviour for that table, even if
there isn't an image in the database it still shows a broken image. Any ideas?
AND...
2) When users come to ym site to insert data and images, I want them to be
able to edit their data before they submit it. What behaviour do I need to use
that allows them to 'edit' their data and re-send so it uses the same ID in the
database as opposed to creating a new one?
Many thanks in advance to whoever can help or point me in the right direction.
Patrick
pporter Guest
-
Clukey #6
Re: Showing a specific record from a recordset
Patrick,
For the first one, if an image has no src it will always show a broken image,
so you will need to create a default image to shows if there isn't one in the
database, you could just use a transparent square.
For the latter, look into the Update Record server behavior.
Clukey Guest
-
pporter #7
Re: Showing a specific record from a recordset
Hi Clukey,
Thank you so much for taking the time to help me with this, much appreciated.
Regards,
Patrick
pporter Guest
-
Clukey #8
Re: Showing a specific record from a recordset
Patrick, sorry I misunderstood your question about the broken image, I think I
do now though, and the 'show region if recordset is not emptry' server behavior
won't work for what your trying to do, so replace it with this code.
<?php if (strlen($row_yourRecordset['yourImageField']) > 0) { ?>
<img src="<?php echo $row_yourRecordset['yourImageField']; ?>" width="width"
height="height">
<?php } ?>
And replace "yourRecordset" , "yourImageField" , "width" and "height" with
your information
Clukey
Clukey Guest
-
Kyle R. #9
Re: Showing a specific record from a recordset
(I accidentally posted this originally in the General Discussion Forum - sorry
for the duplicate but I realized that it probably belongs in this forum.)
I have a dynamic page (PHP) set up to display information from a database
(mySQL) in the format:
Name1
Name2
Address1
Address2
City, ST ZIP
However many entries in the database do not have a Name2 or an Address2 (the
field is blank in the database). So, when the page is displayed for entries
lacking Name2 or Address2, it puts a blank line in that field, for example:
John Doe
123 Main Street
Anytown, US 12345
How do I make it not display fields if there is nothing to display? The end
result should look like:
John Doe
123 Main Street
Anytown, US 12345
Of course some records do have Name2 and Address2 fields and I need them to
display. I have tried using the "show if recordset is not empty" behavior, but
the record set will never be completely empty so that does not work. Thanks!!
Kyle R.
Kyle R. Guest
-
Clukey #10
Re: Showing a specific record from a recordset
Kyle, you can use the same code I showed Patrick in my last post, just change the <img> tag to your dynamic text and replace "yourRecordset" and "yourImageField" with your information.
Clukey Guest
-
Kyle R. #11
Re: Showing a specific record from a recordset
Clukey,
Thanks for the info! I will give that a try and see if I can get it right! I am quite new at this... :-)
Thanks again!
Kyle R. Guest



Reply With Quote

