Author |
Topic |
CooLGiL
Junior Member
126 Posts |
Posted - 23 April 2002 : 11:08:56
|
so, man, how can i solve my problem?? i will give you someting it may help you ardenstand my problem:
this is the "news" table
ID body writer title date_date time_time
1 gil1 gil11 gil111 10/00/99 10:00:00 2 gil2 gil22 gil222 20/00/00 20:00:00
3 gil3 gil33 gil333 30/00/00 30:00:00
4 gil4 gil44 gil444 40/00/00 40:00:00
5 gil5 gil55 gil555 50/00/00 50:00:00
6 gil6 gil66 gil666 60/00/00 60:00:00
when i insert line the line become "7".
and in the page i want it to be the first.
|
|
|
CooLGiL
Junior Member
126 Posts |
Posted - 23 April 2002 : 11:11:45
|
and, news_page_number is a value in my database. that let the user confirm the number of pagegs that will be shown in the main page...
its default value is 5
|
|
|
CooLGiL
Junior Member
126 Posts |
Posted - 23 April 2002 : 11:13:11
|
if im not tuching the code in the start he is working perfect. but i want the table to be opsidedown
|
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 23 April 2002 : 11:13:51
|
The code above that I gave you will work, just add the DESC on to it and see.
You not in editing the database or anything when you try to run it are you causing it to be locked out from the server ?
www.daoc-halo.com |
|
|
CooLGiL
Junior Member
126 Posts |
Posted - 23 April 2002 : 11:17:41
|
wow, thanks, its working when i add the DESC. but i want you to explain me the code and the objects. cuse i dont know andy of what you wrote.
|
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 23 April 2002 : 11:22:24
|
All I did was use a quick method of looping through a recordsets attirbutes
Lemme find an 4guys article or something on it for you.
www.daoc-halo.com |
|
|
CooLGiL
Junior Member
126 Posts |
Posted - 23 April 2002 : 11:23:31
|
danmmit, its nnot good :(. can you edit MY CODE and see if you can make it work as i want?
|
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 23 April 2002 : 11:28:53
|
Well I found one anyway
http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=44
Sorry its 3:30am here, I can't really spend any more time helping you tonight errr this morning.
www.daoc-halo.com
Edited by - Gremlin on 23 April 2002 11:29:42 |
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 23 April 2002 : 11:34:28
|
You still haven't said what news_number_page holds, so I'll assume its not required (edit actually you have I missed that post sorry)
<% dim news_number_page, table_border_color, table_bgcolor, text_body_color ,text_writer_color, text_date_color, text_time_color, text_body_font, text_body_size, text_head_font, text_head_size, text_head_color, title_align, body_align, writer_align, time_align, date_align, table_align
set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("News.mdb")
Conn.Errors.Clear
set rs = Server.CreateObject("ADODB.Recordset")
Sql = "select * from design" set rs = Conn.Execute (Sql) table_border_color=rs("table_border_color") table_bgcolor=rs("table_bgcolor") text_body_color=rs("text_body_color") text_date_color=rs("text_date_color") text_time_color=rs("text_time_color") text_body_font=rs("text_body_font") text_body_size=rs("text_body_size") text_head_font=rs("text_head_font") text_head_size=rs("text_head_size") text_head_color=rs("text_head_color") news_number_page = rs("news_number_page") title_align=rs("title_align") body_align=rs("body_align") time_align=rs("time_align") date_align=rs("date_align") writer_align=rs("writer_align") table_align=rs("table_align") rs.close set rs=nothing conn.close set conn=nothing
set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("News.mdb")
Conn.Errors.Clear
set rs = Server.CreateObject("ADODB.Recordset")
Sql = "SELECT * FROM news ORDER BY ID DESC" set rs = Conn.Execute (Sql) while not rs.EOF for each item in rs.fields Response.Write "<p>" & item.name & ": " & item.value & "</p>" next rs.MoveNext() wend rs.Close() set rs = nothing conn.close set conn=nothing %>
www.daoc-halo.com
Edited by - Gremlin on 23 April 2002 11:37:45 |
|
|
CooLGiL
Junior Member
126 Posts |
Posted - 23 April 2002 : 11:35:06
|
ok, thanks. talk tommrow, i still didnt solve my problem.
|
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 23 April 2002 : 11:39:05
|
Try the above :) It really should work as far as I can tell, maybe I'm too tired and I've missed something really obvious that someone else will spot.
www.daoc-halo.com |
|
|
CooLGiL
Junior Member
126 Posts |
Posted - 23 April 2002 : 11:44:30
|
it is working, but its not i wanted!. i maked a very good design and it sims that i cant insert it to the code you have written. its doubling all the tables to like 6 of every field...
|
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 23 April 2002 : 11:52:41
|
if you want to just email me the Database and the page I'll have a look at it in the morning for you.
www.daoc-halo.com
Edited by - Gremlin on 23 April 2002 11:56:29 |
|
|
CooLGiL
Junior Member
126 Posts |
Posted - 24 April 2002 : 07:21:40
|
i sent the files to your email.
Edited by - coolgil on 24 April 2002 07:22:56 |
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 24 April 2002 : 08:45:34
|
Thanks, but its unlikely I'll get them now, my host had a pretty major failure yesterday and lost his server so any email queued up is likely to be in limbo for a couple of weeks potentially.
I'm just in the process of trying to sort out a new home for my site so will be flat out until I get that sorted out.
If your not in a huge hurry I'll be able to help you in a couple of days but just not immediately sorry.
www.daoc-halo.com |
|
|
Topic |
|