Page 1 of 1
Guestbook
Posted: Thu Apr 15, 2004 1:11 pm
by bajaber
Am designing a guestbook i would like somebody to help on how to view all the people who have signed my guestbook, and the view page should be divided into only 5users on each page.......pls help
Posted: Thu Apr 15, 2004 4:56 pm
by tim
u need to be more specific.
cant say build me a vechicle and hope someone makes you a truck instead of a go-kart.
What sources do you have? MySQL database? so forth
Posted: Thu Apr 15, 2004 10:18 pm
by John Cartwright
do a search on pagination..
do people have an account to sign your guestbook?
Posted: Fri Apr 16, 2004 6:55 am
by malcolmboston
Code: Select all
mysql_query"SELECT DISTINCT username FROM guestbook WHERE username <> 'Guest'");
Posted: Fri Apr 16, 2004 8:27 am
by vigge89
malcolmboston wrote:Code: Select all
mysql_query("SELECT DISTINCT (username) FROM guestbook WHERE username <> 'Guest'");
i've never seen "DISTINCT (username)" before, could you tell me what it does?
Posted: Fri Apr 16, 2004 8:30 am
by malcolmboston
my bad, i edited it
im pretty sure you know what distinct is used for........
Posted: Fri Apr 16, 2004 8:48 am
by JayBird
DISTINCT will (not suprisingly) return distinct occurences in a result set. For example, the master_name table has more than one person with the last name Smith. If you wanted to select last names without repeating results you would use DISTINCT.
Mark
Posted: Fri Apr 16, 2004 8:53 am
by malcolmboston
the reason i did it that way was so that if a user name John Smith had made 50 messages it would only retrieve his name once instead of every instance he had posted a message
Posted: Fri Apr 16, 2004 3:20 pm
by vigge89
ahh, i didn't know
thanks

, now i'm a little better at MySQL

Posted: Fri Apr 16, 2004 10:13 pm
by bajaber
tim wrote:u need to be more specific.
cant say build me a vechicle and hope someone makes you a truck instead of a go-kart.
What sources do you have? MySQL database? so forth
.................................................
Thanx alot tim.
as said i wanted to make a guest book, i do use Mysql database, i want wen somebody click on the submit button, then all his info(entry) will be posted and stored in my database.........
Posted: Sat Apr 17, 2004 12:19 am
by phice
Don't reinvent the wheel.
http://www.hotscripts.com/PHP/
I'm sure there are hundreds of them out there.
Posted: Sat Apr 17, 2004 7:21 am
by vigge89
more like thousands

Posted: Sat Apr 17, 2004 8:10 am
by malcolmboston
phice wrote:Don't reinvent the wheel.
lol, i always try to prevent this, i dont really think you learn if your using other peopls scripts, how can you fully understand the in's and out's of it?
personally i
always do everything myself i have a couple of hotscripts app's sitting on my drive at home, so i can take a gander at how exactly somehing is done (how i learnt file directories) but the reason i "know so much after so little time" is because i type my app's up from scratch therefore forcing me to undersand the terminology i am using
just my $0.02
Posted: Sat Apr 17, 2004 8:55 am
by JAM
malcolmboston wrote:phice wrote:Don't reinvent the wheel.
lol, i always try to prevent this, i dont really think you learn if your using other peopls scripts, how can you fully understand the in's and out's of it?
Heh...
Youre not supposed to take a pre-existing script, modify it and use that. You still of course should read up on the things you do not understand, so the "dont reinvent the wheel" comments is still legit.
I
do think that looking at other peoples code (understanding it or not) is the best way to get a hang of something, just aslong as you research it before applying it.