padding records returned for display purposes

padding records returned for display purposes

Post by Jack Murph » Sat, 21 Oct 2000 10:30:25



I have a page, shows 9 records per page (these are button designs by school
kids). I have it working where the page starts, shows the first page of the
whole list. Search form on the page, can search for first, last, or school.

What I'd like is to have the page always display a full set of images,
regardless of how many are returned by the query. So if I search exactly for
one record (right first name, last, school) it would return that record, but
also display 8 others.

My boss sees this as just showing the records around the one I search for,
no matter how I explain that a sql search pulls records that match the
query, its not like flipping through a book looking for a page. He may not
understand sql searches, but he does have a point -- a full page of designs
looks much better than a single design.

So how can I do this? I know how to check the number of records returned,
but what's the next step? Is there a way to pull more records in the search?
Can I select x number of random designs? Or even show the first x number
after the query results are shown.

Any ideas?
Jack Murphy

 
 
 

padding records returned for display purposes

Post by farha » Sat, 21 Oct 2000 04:00:00


How about
SELECT * from myTable where lName = 'dddd' UNION SELECT * FROM myTable where
lName <> 'dddd'

The first SELECT does your filter for specifc name and the second one gets
the rest.

Regards,
farhan


Quote:> I have a page, shows 9 records per page (these are button designs by
school
> kids). I have it working where the page starts, shows the first page of
the
> whole list. Search form on the page, can search for first, last, or
school.

> What I'd like is to have the page always display a full set of images,
> regardless of how many are returned by the query. So if I search exactly
for
> one record (right first name, last, school) it would return that record,
but
> also display 8 others.

> My boss sees this as just showing the records around the one I search for,
> no matter how I explain that a sql search pulls records that match the
> query, its not like flipping through a book looking for a page. He may not
> understand sql searches, but he does have a point -- a full page of
designs
> looks much better than a single design.

> So how can I do this? I know how to check the number of records returned,
> but what's the next step? Is there a way to pull more records in the
search?
> Can I select x number of random designs? Or even show the first x number
> after the query results are shown.

> Any ideas?
> Jack Murphy


 
 
 

padding records returned for display purposes

Post by farha » Sat, 21 Oct 2000 04:00:00


OR Run two separate queries.  Get the count of records form the first one
and then run the second one asking for "MaxNumberOnPage - Count " records.
For example if the first one returned 2 records then ask for TOP 7 from the
second one.


Quote:> I have a page, shows 9 records per page (these are button designs by
school
> kids). I have it working where the page starts, shows the first page of
the
> whole list. Search form on the page, can search for first, last, or
school.

> What I'd like is to have the page always display a full set of images,
> regardless of how many are returned by the query. So if I search exactly
for
> one record (right first name, last, school) it would return that record,
but
> also display 8 others.

> My boss sees this as just showing the records around the one I search for,
> no matter how I explain that a sql search pulls records that match the
> query, its not like flipping through a book looking for a page. He may not
> understand sql searches, but he does have a point -- a full page of
designs
> looks much better than a single design.

> So how can I do this? I know how to check the number of records returned,
> but what's the next step? Is there a way to pull more records in the
search?
> Can I select x number of random designs? Or even show the first x number
> after the query results are shown.

> Any ideas?
> Jack Murphy

 
 
 

1. Nummerate table records for sorting purpose

Hi,

I am working on a query that will update records like

dept_id        sort_index
1000153        0
1000155        0
1000156        0
1000160        0
1000161        0

to

dept_id        sort_index
1000153        1
1000155        2
1000156        3
1000160        4
1000161        5

My current query looks like this



BEGIN

  BEGIN


  END

 END

but of course it doesn't work since all sort_index will be updated to 1 and
no more updates will be done.

Any help on this would be appreciated

Thanks in advance
Christian

2. What's wrong in my text import coding?

3. Return strings padded with spaces

4. Excuse me, how to update using ODBC

5. padding spaces being returned

6. Errors Occurred - 2147217887

7. Pad Records with 0's

8. Can't start IDS 7.3 for Linux

9. Remove record padding/whitespace after import

10. Multiple records displayed as one record

11. vb5 displays a record on screen but prints data from another record

12. Help : Multiple record display of records for M:N relationship

13. Display Record of Records