Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 136,491 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,699 people online right now. Registration is fast and FREE... Join Now!




some advice for me please !

 
Reply to this topicStart new topic

some advice for me please !, need to find a script or command that displays the ammount of links wi

antonyjoeserjent
30 Jan, 2008 - 11:22 AM
Post #1

New D.I.C Head
*

Joined: 30 Jan, 2008
Posts: 2

Dear sir,
hi, I have a question.
Im sorry if i have posted this in the incorrect place,
it is neither my intention to offend or annoy.
my question>I am building a website,
the main page (index) is built up of a series of links,
a bit like gumtree or ebay.,
within all of these links are more links to each individual post.
What i am trying to do is to find a script that will automaticlly count the number of posts in each link

.example>
cars (4)
bikes (1)
trucks (4)
planes (0)

because i will not have a very large ammount of postings, i would like to be able to inform my visitors on the main page whether its good for them to follow or not.
I imagine its a simple piece of code , but i have tried in vain to search for something along these lines,Just the name of the code or software or even what type of action i am trying to perform would be a great start.I hope you can help me,

take a look at www.olive-tree.es for a better idea of what i mean

many thanks and kind regards.



AJSerjent
User is offlineProfile CardPM
+Quote Post

Martyr2
RE: Some Advice For Me Please !
30 Jan, 2008 - 11:50 AM
Post #2

Programming Theoretician
Group Icon

Joined: 18 Apr, 2007
Posts: 5,212



Thanked: 216 times
Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions
Typically these numbers are created through an aggregation SQL call to the database. For instance...

CODE

select count(*) as totalpostings from postings where folderid = 2


Something like this would give you the number of postings in the folder that has the ID of 2. This isn't typically calculated through following URL links because it would be hard to keep track of and second it would be a bit more time consuming.

I suggest you look up the term "aggregate functions" and in specific "count()" in SQL to help you out with this. smile.gif

User is online!Profile CardPM
+Quote Post

antonyjoeserjent
RE: Some Advice For Me Please !
30 Jan, 2008 - 12:36 PM
Post #3

New D.I.C Head
*

Joined: 30 Jan, 2008
Posts: 2

thanks very much for the helpful information, i know nothing about sql databases but its given me a start in the right direction.
many thanks once again,
ajs rolleyes.gif rolleyes.gif rolleyes.gif pirate.gif crazy.gif mad.gif


QUOTE(Martyr2 @ 30 Jan, 2008 - 12:50 PM) *

Typically these numbers are created through an aggregation SQL call to the database. For instance...

CODE

select count(*) as totalpostings from postings where folderid = 2


Something like this would give you the number of postings in the folder that has the ID of 2. This isn't typically calculated through following URL links because it would be hard to keep track of and second it would be a bit more time consuming.

I suggest you look up the term "aggregate functions" and in specific "count()" in SQL to help you out with this. smile.gif


User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 07:37PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month