Simple Machines Community Forum

General Community => Scripting Help => Topic started by: ryansdistrict on March 03, 2008, 11:17:05 AM

Title: MYSQL question showing random row from database
Post by: ryansdistrict on March 03, 2008, 11:17:05 AM
MYSQL question showing random row from database

i am trying to mess around with tags on my site
i would like to show random row content from the available rows in my mysql table
i want to run something like the cloud of tags
how can i do this ?

Regards
Title: Re: MYSQL question showing random row from database
Post by: rsw686 on March 03, 2008, 02:29:13 PM
A SQL statement like the following would work.

SELECT * FROM tablename ORDER BY RAND() LIMIT 1
Title: Re: MYSQL question showing random row from database
Post by: ryansdistrict on March 03, 2008, 02:39:28 PM
ye did this and loved it
but how much max links per page is good for seo
i dont want to create a page of links and having google skipping my pages :)
is it a good idea to have a cloud of links for forum topics in the footer ?
Title: Re: MYSQL question showing random row from database
Post by: rsw686 on March 03, 2008, 02:44:33 PM
I modified the sitemap.php from the SE04SMF mod. Then sign up for the free google webmasters program and submit your site map to them.
Title: Re: MYSQL question showing random row from database
Post by: ryansdistrict on March 03, 2008, 02:55:40 PM
ok
how much max links per page is good for seo
Title: Re: MYSQL question showing random row from database
Post by: rsw686 on March 03, 2008, 02:57:03 PM
I don't remember it was like 2k. You should do a sitemap as well. I think google has a max of 2k-3k links per sitemap. Check their site to be sure.