You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 149 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Block that displays latest 10 items added to a database [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Tjendol
Sergeant
Sergeant


Joined: Dec 15, 2003
Posts: 77


PostPosted: Sun Dec 21, 2003 10:26 am Reply with quoteBack to top

Hi all,

I have a form that adds several items to a table and stores the info in a database.

I would like a block on my main page that will display the latest ten items of this table.

I cannot program in php or sql.

Can someone still tell me how to accomplish this or are there scripts that will do this for me?
Find all posts by TjendolView user's profileSend private message
RedGerry
Captain
Captain


Joined: Jul 28, 2003
Posts: 304

Location: Alloa, Scotland

PostPosted: Sun Dec 21, 2003 5:38 pm Reply with quoteBack to top

If you give me the table name, field names and what you want displayed I'll post the code for you..

_________________
RedGerry.com - Home of RG_Sports
Find all posts by RedGerryView user's profileSend private messageVisit poster's websiteMSN MessengerICQ Number
Tjendol
Sergeant
Sergeant


Joined: Dec 15, 2003
Posts: 77


PostPosted: Mon Dec 22, 2003 12:52 am Reply with quoteBack to top

Here's an example of a table I want to use it on.


http://www.tjendol.com/modules.php?name=divx


Thnx a lot man.
Find all posts by TjendolView user's profileSend private message
gschoper
Captain
Captain


Joined: Sep 16, 2003
Posts: 380


PostPosted: Mon Dec 22, 2003 1:11 am Reply with quoteBack to top

Can you post the database table name and field names, it would make it easier.

gschoper

_________________
Image
http://nuke.schoper.net/
Find all posts by gschoperView user's profileSend private messageSend e-mailVisit poster's website
Tjendol
Sergeant
Sergeant


Joined: Dec 15, 2003
Posts: 77


PostPosted: Mon Dec 22, 2003 1:45 am Reply with quoteBack to top

Sure,

The table name is: "divx"

The field names are:

"Divx Title" "Download Location", "Language", "Name Author" "E-mail" and "Date Added".
Find all posts by TjendolView user's profileSend private message
RedGerry
Captain
Captain


Joined: Jul 28, 2003
Posts: 304

Location: Alloa, Scotland

PostPosted: Mon Dec 22, 2003 5:52 am Reply with quoteBack to top

Right you want top 10? by what...?

I've written two blocks for my RG_Sports module that can be seen on the right hand side about half way down - top players and top clubs

http://www.scottishwomensfootball.co.uk

These are using a field 'counter' to sort, are you sure about the above field names, spaces in field names are a pain...

_________________
RedGerry.com - Home of RG_Sports
Find all posts by RedGerryView user's profileSend private messageVisit poster's websiteMSN MessengerICQ Number
Tjendol
Sergeant
Sergeant


Joined: Dec 15, 2003
Posts: 77


PostPosted: Mon Dec 22, 2003 6:01 am Reply with quoteBack to top

Hi,

Only E-mail should be E Mail
Find all posts by TjendolView user's profileSend private message
Lirpa
Nuke Cadet
Nuke Cadet


Joined: Dec 22, 2003
Posts: 4


PostPosted: Mon Dec 22, 2003 6:33 am Reply with quoteBack to top

RedGerry wrote:
Right you want top 10? by what...?

I've written two blocks for my RG_Sports module that can be seen on the right hand side about half way down - top players and top clubs

http://www.scottishwomensfootball.co.uk

These are using a field 'counter' to sort, are you sure about the above field names, spaces in field names are a pain...


Hi, where can I get this block from?
Find all posts by LirpaView user's profileSend private message
Tjendol
Sergeant
Sergeant


Joined: Dec 15, 2003
Posts: 77


PostPosted: Mon Dec 22, 2003 8:27 am Reply with quoteBack to top

Like I explained, I would like the last ten added items to a table,

shown in a custom block or just on my main page, in the center.
Find all posts by TjendolView user's profileSend private message
RedGerry
Captain
Captain


Joined: Jul 28, 2003
Posts: 304

Location: Alloa, Scotland

PostPosted: Tue Dec 23, 2003 4:24 am Reply with quoteBack to top

ok.. give me your email (by PM) and I'll send it over to you later today. Midday here in Scotland and am off to get the last of my Christmas shopping done...

_________________
RedGerry.com - Home of RG_Sports
Find all posts by RedGerryView user's profileSend private messageVisit poster's websiteMSN MessengerICQ Number
Tjendol
Sergeant
Sergeant


Joined: Dec 15, 2003
Posts: 77


PostPosted: Tue Dec 23, 2003 5:07 am Reply with quoteBack to top

Take your time man, many thnx Smile

I'll pm you
Find all posts by TjendolView user's profileSend private message
Tjendol
Sergeant
Sergeant


Joined: Dec 15, 2003
Posts: 77


PostPosted: Tue Dec 23, 2003 4:54 pm Reply with quoteBack to top

Does anybody else know how to make this work?
Find all posts by TjendolView user's profileSend private message
Tjendol
Sergeant
Sergeant


Joined: Dec 15, 2003
Posts: 77


PostPosted: Thu Dec 25, 2003 3:18 am Reply with quoteBack to top

*bump*
Find all posts by TjendolView user's profileSend private message
Tjendol
Sergeant
Sergeant


Joined: Dec 15, 2003
Posts: 77


PostPosted: Thu Dec 25, 2003 3:50 pm Reply with quoteBack to top

K guys, since I got no reply up til now, I decided to give it a try myself.

this is the code I'm using:

Code:
<?php
$xvid='xvid';
 
$conn = mysql_connect("localhost", "username", "pass")
  or die("failed to connect: " . mysql_error());
mysql_select_db("xvid")
  or die("failed to select database: ".mysql_error());


$query = SELECT Xvid_Title FROM xvid ORDER by Language DESC limit 10;
//return $query;
$result=mysql_query($query);
?>


Can someone tell me what's wrong with it?

Secondly:

How can I display the values it gets from my table on a page?
Find all posts by TjendolView user's profileSend private message
Tjendol
Sergeant
Sergeant


Joined: Dec 15, 2003
Posts: 77


PostPosted: Wed Dec 31, 2003 2:49 am Reply with quoteBack to top

anybody??
Find all posts by TjendolView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.620 Seconds - 200 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::