Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Any idea

Status
Not open for further replies.

sam1996

Programmer
Sep 3, 2006
12
0
0
CA
Hi , I have a problem here, I have artist query that can can put some of the record and one pic in one field and when clicking on that field I should get all the pictures of that artist, first what can I use to put more than one field on the page horizontally more than one artist, socond how can I do the details page another query or can I use the first one , thank you .
 
Keep in mind there are more than one master page
 
this is the query


<cfquery name="search_rs" datasource="cflyers">
SELECT address.bizname, address.bizcategory, address.province, address.city, address.address,address.side, address.telephone, adds.add1, adds.add2, adds.add3, adds.add4, adds.add5, adds.add6, adds.add7, adds.add8, adds.add9, adds.add10, adds.add11, adds.add12
FROM adds INNER JOIN address ON adds.bizcategory = address.bizcategory
WHERE (((address.bizcategory)="#URL.catg_ID#" AND address.province ="#URL.prov_id#" AND address.city="#URL.city#" AND address.side="#URL.side#"));
 
The way to program a page so that the output of the query is the way you want it, is first, do it yourself manually.

Notice exactly what you do and what decisions you make when placing each item. Write it down on paper each step of the way. Then go back and see how you can do that in whatever language you are using.

For instance if you want a list straight down, your manual actions are:

write data
move pencil down a row
move pencil to beginning of row
IF there is more data, start over, otherwise quit.

You would then look and see this is the same as doing this:

<cfoutput query="myQuery">
#myData#<br>
</cfoutput>

DonOmite
 
sam1996, how are you outputting the query resultset on your page? Can we get a URL link so we can see the output?

____________________________________
Just Imagine.
 
its really simple just a query that pull 200 record if not more and I want to show these query in multiple pages of course Next link,and in every page there is info about the artist, and click on the artist field it will give me more details about that artist, think of it as 299 artists in the database.
 
and how can I do that or where I can find info about this . thanks for the effort
 
sam1996, in my previous post I gave you a link for a tutorial. You can also do a google search for "coldfusion pagination" for more tutorials.

____________________________________
Just Imagine.
 
thank you for the info but what about the pop window for each artist.
 
Use JS for the popup window.

You'd have to pass the var name of the artist the user wants more info on, then on the popup page just query the dB (based on the ID of the artist which you'd pass in the link) to retrieve all the info.

Code:
<a href="##" onClick="openWindow(moreInfo.cfm?artist=109)">

ON moreInfo.cfm:
<cfquery name="" datasource="">
  SELECT ...
  FROM ...
  WHERE artits_ID = #URL.artist#
</cfquery>

Then just display the info at the bottom using <table> or CSS style.

*The openWindow is NOT the real code, that was used to gicve you an idea. Do a google search on how to pop-up windows with JS.

____________________________________
Just Imagine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top