Yes ! I just solve it, the top ten is working beside the list of all authors liked to their articles.
Thanks a lot, you've done grate help and you deserve the star [thumbsup2]
I'll start new threat for formating my list in more than one column.
Adel
All the work should be in the same page authors.asp.
1. This the code I'm trying in to display a full list of author names in more than one column.
<!--#include file=conn.inc -->
<%
selectnewsSQL="select * from authors"
set rsnews=ADO.execute(selectnewsSQL)
%>
<%
count = 0
mymod = 0
do while...
1. Still shows the result in one column
2. Example of No.2:
The latest articles:
1. Article 1 title
2. Article 2 title
3.
.
.
10
List Of authors:
1. Author 1 name
2. Author 2 name
.
Adel
Ok .. for No. 2 I mean I want to disply on upper pert the last ten articles has been added on, and then under this on the same page, a full list of all authors.
Adel
Sorry for being too long, but I really learned a lot from this.
1. This code display the same result as before, means one column, although I tried to change the count and mod values.
2. Yes it shows the latest 10 had been added, but without full authors list?
Adel
1. I want Authors name on two columns, suppose I've a long list of Authors it's good idea to put them on more than on column .. somthing like this:
1. Kim 20. John
2. Mick 21. Harry
3. Garry 22. Poul
. .
. .
. .
Note...
More questions .. ok I have 2:
1. For authors or articles pages the result is displayed in one column on the table I've created. Can I display it in 2 or more columns?
2. Above the authors list I want to show only the last ten aricles had been added recently (I think SQL statement).
Thanks in...
Yes DotNetGnat you are right, Thanks. Suppose an author has no article and is listed on the database can you wright IF statement to display a friendly message.
Adel
Ok now. I linked between these two pages. I can display a list of all authors (authors.asp) then when I click on any author I should have a list of all articles belong to him/her on (articles.asp) the problem is when I click on any author the same list is displayed.
authors.asp code is...
Well done, you’ve done it! It’s a big help I appreciate your time and effort. Then the error was with the quotation mark because the authored type was string.
Thanks a lot.
[thumbsup2]
Adel
Good try DotNetGnat. At least we moved a step forward. Because I stored authorID as string, when I used:
selectnewsSQL="select * from articles, authors where authors.authorID=articles.authorID AND authors.authorID='1' "
I can disply authorID=1 details. But when I tried to use:
where...
Oh God .. still an error. This code can disply data from two tables. Hence I've deleted WHERE statment and created my tables as what you said DotNetGnat, so my code is as follows:
<!--#include file=..\includes\header.inc -->
<%
SET rsnews= Server.CreateObject("ADODB.RECORDSET")...
I gave it some trying, so I just request data from one table without WHERE like this:
<!--#include file=conn.asp -->
<%
SET rsnews= Server.CreateObject("ADODB.RECORDSET")
Authorid=request.querystring("Authorid")
selectnewsSQL="select * from authors"
set rsnews=ADO.execute(selectnewsSQL)
%>...
Do you mean the connection file? Yes off course
It's as foloows:
<%
Dim ConnectionString
Dim ADO
ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & Server.MapPath("../db/mydb.mdb")
Set ADO=Server.CreateObject("ADODB.Connection")
ADO.ConnectionString =ConnectionString...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.