Limiting the results in a Repeat Region
Hi,
I've created a repeat region that lists all the cities from a selected county search. the problem is the database has multiple city listings. nyone know how to limit the results to just one city where there are more than one listing??? Must be prety simple
Thanks for gwtting back to me. I'm v new to mySQL and databases - I'm doing alright - www.ukbiker.co.uk but i'm not 100% yet.
The LIMIT makes sense, and I've seen a couple of answers but i'm not sure how to implement it!!!!
I've got :
SELECT suspeNd, city, county
FROM partners
WHERE county = colname AND suspend = 'N' and city = LIMIT 1 (I'm betting this isn't right!)
ORDER BY city ASC
Don't judge me LOL
Similar Messages
-
Shorten the length of a repeat region
I am trying to figure out how to shorten the length of the
<li> in my repeat region. I want to limit each <li> to
display no more than 40 characters in length on the web page.
In the head of my page:
<script type="text/javascript">
<!--
var dsFeedArticles = new
Spry.Data.XMLDataSet("../feed/feeds/dailyfeed.xml",
"rss/channel/item/article");
-->
</script>
I have the following code in my repeat region:
<ul spry:repeatchildren="dsFeedArticles>
<li class="text">{dsFeedArticles::article}</li>
</ul>
I've looked at possibly a substring function but am confused
to how to implement it. Any ideas? Any assistance would be
appreciated.
Regards,
MichaelArnout,
Regret the delay. My code is behind an intranet firewall, but
pasted below is the bulk of my code. Any help would be greatly
appreciated.
Regards,
Michael
CODE BELOW:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml"
xmlns:spry="
http://ns.adobe.com/spry">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title></title>
<!--links for css and js-->
<link href="css/main.css" rel="stylesheet" type="text/css"
/>
<link href="css/blockmenu.css" rel="stylesheet"
type="text/css" />
<link href="..css/print.css" rel="stylesheet"
type="text/css" media="print" />
<script src="js/switchcontent.js"
type="text/javascript"></script>
<script src="../SpryAssets/xpath.js"
type="text/javascript"></script>
<script src="../SpryAssets/SpryData.js"
type="text/javascript"></script>
<script type="text/javascript">
<!--
var dsFeed = new
Spry.Data.XMLDataSet("../feeds/dailyfeed.xml",
"rss/channel/item",{sortOnLoad:"article",sortOrderOnLoad:"descending"});
var dsFeedArticles = new
Spry.Data.XMLDataSet("../feeds/dailyfeed.xml",
"rss/channel/item/article");
dsFeedArticles.addObserver(addTeaserColumn);
function addTeaserColumn(notificationType, notifier, data)
if(notificationType != "onPostLoad")
return;
//Get the unfiltered set of rows from the data set
var rows=notifier.getData(true);
var numRows = rows.length;
// Now loop over every row generate a teaser column
for (var i=0; i < numRows; i++)
//Check the length of the entity decoded version of the desc
column, because we don't want to factor in the length of entity
encoded character names in our length check
var row = rows[ i ];
var desc = row[ "desc" ];
var decodedDesc = Spry.Utils.decodeEntities(desc);
if (decodedDesc.length > 20)
row[ "teaser" ] =
Spry.Utils.encodeEntities(decodedDesc.substring(1,20) + "...");
else
row[ "teaser" ] = desc;
//-->
</script>
</head>
<body>
<!--END LEFT NAVIGATION-->
<!--BEGIN MAIN TEXT SECTION-->
<div id="bodysection">
<div class="summarytitle">
<!-- #BeginDate format:Am1 -->November 10, 2008<!--
#EndDate -->
</div>
<!--date/time is automated, if date is not correct check
your system clock-->
<div id="oneproduct" style="border-bottom:#CCCCCC thin
solid; padding-bottom:5px; ">
<div spry:detailregion="dsFeed dsFeedArticles">
<p><a href="{link}" class="producttitle">
{title} {classification} <span
class="datestamp">{feedDate}</span></a>
<ul spry:repeatchildren="dsFeedArticles">{teaser}
<li class="text" style="list-style-type:none; margin:0px
0 -7px -40px;">{dsFeedArticles::article} </li>
</ul>
</div>
</div>
<!--END MAIN CONTENT-->
</body>
</html> -
Limiting the result set?
How can I limit the result set of query without inventing a cursor, e.g. Select * from foo order by date desc LIMIT TO 5 rows
Is there a statment in Oracle 8i enabling such a query (like in Oracle RDB)?To limit the result set use rownum. Here is an example:
select * from tab where rownum <=5;
I found this on another technet forum when I search on limiting query rows returned. -
Newbie Q: Limiting the result count
Hi,
I wanted to know if there is any other way to limit the result set other than using this:
SELECT * FROM (select display_url, rownum as r from table_name) where r <= 10;
Its a times like these that mysql looks so easy to use with its LIMIT feature.
thanksHi,
SELECT display_url
FROM table_name
SAMPLE (5);will returns about 5% of the rows you would get without the SAMPLE clause. Don't expect exactly 5%.
Unlike the ROWNUM technique, this will produce a random sampling.
For details, see the [SQL Language Reference man ual|http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_10002.htm#sthref9780]. -
Repeating Regions and Editable Tag Attributes?
I want to produce a template that will let users create pages
that list items as a thumbnail image and a short text description,
one after the other.
I can set this up as a repeating region, but I would also
like to make only certain attributes of the image editable (src and
alt for example). However, when I use editable tag attributes to do
this, the image in each repeated region ends up with the same
attribute values - when I add a new repeat region and then change
the src tag through the Template Properties dialog,
all of the images take on the same src value. Looking at the
code, it looks like the editable instances in each repeated region
get the same name, and so I can see that DW will get confused.
Is this a limitation in DW? Is there a work around anyone can
suggest?
TIASo, you have some number of people who are editing the child
pages and you
want to constrain their editing choices? Are you using
Contribute?
Anyhow, I am not aware of any convenient way you can do
something like this
using DW's Template features.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"manicbananic" <[email protected]> wrote in
message
news:g7pimq$fvg$[email protected]..
>I want to produce a template that will let users create
pages that list
>items
> as a thumbnail image and a short text description, one
after the other.
>
> I can set this up as a repeating region, but I would
also like to make
> only
> certain attributes of the image editable (src and alt
for example).
> However,
> when I use editable tag attributes to do this, the image
in each repeated
> region ends up with the same attribute values - when I
add a new repeat
> region
> and then change the src tag through the Template
Properties dialog,
>
all
> of the images take on the same src value. Looking at the
code, it looks
> like
> the editable instances in each repeated region get the
same name, and so I
> can
> see that DW will get confused.
>
> Is this a limitation in DW? Is there a work around
anyone can suggest?
>
> TIA
> -
How can I show all the results returned by a sql query?
Hi guys,
I need your help.
Let's say I have one table: TableA. Fields of TableA are aleg, anon, apes. The following sentence can return, in general, several rows: select anon from TableA where aleg = somevalue. I'd like to show the result of column anon but no luck. If I try to show the results in a TextArea and the origin is an sql query only shows the first row value. I tried Show as: show as text (based in PLSQL) and coding an anonymous plsql block as
DECLARE
v_anon TableA.anon%TYPE;
CURSOR v_cur IS
select anon from TableA where aleg = somevalue;
BEGIN
OPEN v_cur;
LOOP
FETCH v_cur INTO v_anon;
EXIT WHEN v_cur%NOTFOUND;
:FIELD_IN_FORM := v_anon;
END LOOP;
CLOSE v_cur;
END;
but in this case it's not shown any result.
So the first question is what kind of field should I use to show the result. And the second one is what can I do to being able to show all the results returned by the query (provided that is more than one single row).
regardsHi Denes,
Just starting with apex. I think I know how to show the results in a report region. I've simplified the posted question.
A more detailed question would be: Suppose you have a region where you have put several text areas to accommodate the result of a multi-column query (lets say for TableA) that only returns one row, each column value returned put in a different text area. Also you want to show the values of other fields in TableB that depends on some value just retrieved from TableA and that you want all values retrieved (from TableA and the linked TableB) to be show in the same region. Is that possible? If yes, how?
Thank you in advance -
Nested templates - problems with inheriting editable/repeating regions
I have made a template called 'basic', with 2 sections, 'maincontent' and 'sidecontent' then nested a template in it called 'home'. In 'home', I have made repeats of some regions (sidecontent) and edited them to make a section I want on all 'home' type pages. When I make a new document from 'basic', it has all the same editable and repeating regions as 'basic'. But when I make a new document from 'home' there are no editable or repeating regions, either in 'sidecontent' which I edited or 'maincontent' which I didn't. I want to be able to edit 'maincontent' when I make a new document from 'home', to make repeating regions and edit them. Please can you advise me what to do?
ThanksWhen I tried to attach the files it automatically zipped them again, so I have put the code above.
Thanks,
Rachel -
Create Word Doc from list with multiple items (repeat region)
I have a document library that creates an invoice document based on another list. The list has multiple items that where purchased and need to appear on the invoice. It is only showing the first purchase item and not the others. How do I get all the items
to display (repeating region)?
Example:
Invoice #
Salesperson
Items Purchased
item 1
item 2
etc...
Thanks!I've tried these examples but it only grabs the first item and places it in the word document. I need it to grab all the items.
Example:
Invoice #
Salesperson
Items Purchased
item 1
item 2
etc... -
PHP Email - Repeat Region Equivalent in Body?
My client wants a summary of products registered in the body
of an email. My email script works great but I don't know how to
add the summary of products (what I'm calling a 'repeat region').
Thanks in advance for your advice and feedbackjasons wrote:
> My recordset looks something like:
>
> cust_id product_name order_date
> 100 PRODUCTA 12/23/08
> 100 PRODUCTB 11/23/07
> 100 PRODUCTC 09/22/07
It's not clear whether this is the same recordset as the one
that
retrieves the password details, but the principle of doing
this is
exactly the same as a repeat region. If you study the code of
a repeat
region in a Dreamweaver page you'll see that it looks
something like this:
do {
// code to be repeated
} while ($row_recordsetName =
mysql_fetch_assoc($recordsetName));
So, in the code that builds the body of the email message:
$message .="Password: $password \n\n";
$message .="Registered products:\n\n";
do {
$message .= $row_recordsetName['product_name']."\n";
} while ($row_recordsetName =
mysql_fetch_assoc($recordsetName));
// rest of mail() script goes here
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/ -
How do I keep a Repeat Region after selection?
I have a Link/Menu button where the user chooses a city. That populates a table with all the courses for that city. Then the user can select any course to show information about that course I have the link set like this, charlottenccourses.php?course=<?php echo $row_getAll['course'];?>. That is working fine, but when they select it, the table with the courses for the city disappears. So they have to select it again and hit go to see the courses again. How can I make that stay to the same city with all the courses until they choose another one? Thanks!
What I have is all on the same page. Let me explain. I have a list/menu
that displays all the cities. Once that is selected, I have a "GO" button
and that creates the table list of all the course in a repeat region. And
the rest of the page is a record set for which course is selected so it
previews information for the course selected. The link is this:
charlottenccourses.php?course=<?php echo $row_getAll['course']; ?>
Once that is selected all the information for that course appears. The
problem is, the original list of courses from the selected city now
disappears. So the user has to go back and select the city, "GO" button if
they want to preview another course. I want to figure out a way to keep that
list of courses there even when the course is selected.
Is there a way to do that will the current structure of the page? -
Hey kids,
Im currently making an admin page for a school website, which has multiple forms. basically each form has a list/menu which will display class names.... but these names are drawn out from the database in a repeat region to complete the list/menu listings.... when i went to put a repeat region on the next form, i was informed i can only use one repeat region on a recordset.... does this mean i have to go about creating a new recordset for every dropdown menu i create, or is there an easier way to use multiple repeat regions from one recordset, or an alternate way?
DavidYou can have multiple repeat regions from a single recordset, but DW won't like it. This means that you are on your own for coding, but luckily the task is not too hard. The trick is to RESET the MySQL pointer into the recordset between repeat regions with mysql_data_seek() (see details here - http://us3.php.net/manual/en/function.mysql-data-seek.php
If you are not a hand coder, this may be a bit beyond your grasp just now.
The DW-friendly way to do it would be to apply multiple recordsets to the page and use one for each repeat region. -
Duplicate records in the Results of SAP Query thru SQVI
Dear All,
I formed a query and joined EKKO, EKBE, EKET & EKES tbls to fetch information on the PO Item-Qty, Delivery Dt., Vendor's Confirmed qty, etc.
However, in the results I get repeated records.
Pls advise the possible reasons for above.
Rgds,Shekhar,
Using a join on these tables is illogical.
EKBE, EKET & EKES each have many-to-one relationships to EKKO. Joining all four tables will typically give you multiple output records with redundant data. Also, using straight inner joins will exclude certain data that you will certainly want to see.
Try instead using Logical Database MEPOLDB. It will sort most of these things out for you.
If you elect to use the logical database, beware of trying to use multiple selection criteria from the lower level tables (EKBE, EKET & EKES). You will not always get the results you expect. Better to only place EKKO fields as selection parameters. Save the other table fields for display.
Rgds,
DB49 -
I have a business directory.
When someone goes to add a new record and submits and the
record to the database, the record being the business name in this
case is then added into the table as a repeated region.
Is there away of the record set/repeated region to assend the
business names once been added in alphabetical order?Never mind, I was placing the repeat region in a blank row
instead of one with data fields. -
How to create a repeating region like the attachements in Gmail
I don't even know how to begin Googling or searching here for
this topic. But I've got a form and I want to have two fields show
up for inputting the fabric type and then the pattern name. This
site will allow them to request fabric swatches to see in person
how they look and make a decision for their furniture. And if
customers want to ask for more than one sample, I want to be able
to have a link that says, "Request another" and when clicked, it
creates another instance of those two fields automagically, just
how the attachments in Gmail work.
Is this something possible with Spry? I'd like to think it
is, but it might need some jury rigging to ensure that the ids for
those text inputs are all unique and such. But like I said, I don't
even know how to begin searching for this topic since "repeating
area" or "repeating region" brings back 1000s of unrelating
results.
Anyone have any experience doing something like this and
could shed some light on it and/or point me toward some resources
that could help out?
Thanks!Hi unnamed,
Suppose you have an id that identifies your record.
Go to Report definiton, tab report attirbutes.
Select the id of your record.
Create a link to the page you want to go to.
Hope this helps.
If not, I suggest you to create a from with report, and analyze the way the wizard has generated it.
Leo -
QM Sceneri: MIC which has it Limits dependent on the results of a MIC.
QM Scenerio
The plan has multiple MIC's all with limits. First five MIC's are independent and rest three are having their limits dependent on the results of a MIC eg with a formula. say 0.8X lower limit and 1.1X upper limit of a MIC., where X is the result of the fifth MIC. Similarly the 7th and the 8th MIC's are having limits dependent on the same MIC with different formula.
This kind of scenerio may be two times in an inspection Plan.
Can the Gurus kindly give me the solution how to do it.No. Nothing that is standard. You will have to probably look at creating your own custom valuation FM. SAP allows you to create these FM's and then config them into the system. You would then selection the custom valuation in a sample procedure that you would create for each of these characteristics. The valuation for the characteristic would then be carried out according to your custom FM. No spec would be displayed in the inspection lot however. But he valuation should be possible.
FF
Maybe you are looking for
-
I am trying to transfer all my photos, documents, and music from my previous Mac to my new one and this new one can barely hold any of the files. Why would that be happening? What can I do to have all of my documents avalaible to me?
-
Sparks when connecting MacBook Air charger to the wall
Hi everybody. Today when I plugged in the MacBook Air power charger to the wall in my room I saw and heard sparks for the first time and the I noticed that the connecter ends of the charger have burnt a little (I see small black dents) but the charge
-
How to delete all scheduled delivery apps from Photosmart 5520
-
its been a reeeeally long time since i joined this forum but my avatar hasn't been approved. I have made this post earlier too. sorry for posting again. Please, the moderators, kindly update my avatar. That'll be really nice.
-
Unable to open jpeg files with photoshop
Hi, just installed the photoshop cc to a mac with mac os x 10.6.8 and when the user is tryinh to open a jpeg file get the following error mesage: "could not complete your request because the file was not found" Thanks