mysql and php display..
Posted 06 May 2006 - 09:23 AM
what i'm trying to do is..
i got 2 data base.. one for pictures and another one for comments..
in php i got the method get so when a person click on a picture the get method searchs for the comment correspoding tot he picture and it display the comment..
i got this working what i can't get working are the fallowing..
in the comment sections i got a username field that when the user levaes a comment it uploads the user name to that field..
this si wroking but i can't get th username to display in php..
neight can i get the time that the user post the comment to be display.. i tried this but it didn't worked..
$sql2="SELECT FROM guestbook WHERE name='$getpic'";
well thats about it :-D i don't know how to get the other 2 rows username and time.. becaus ei'm using the get mothed for the current pic..
and if i try thr picname,username,date from guessbook..
it display all the picname and usenrmae..
so you get the drift..
has to be with the getmother so is only for the current picture..
Posted 06 May 2006 - 11:02 AM
$sql2="SELECT * FROM guestbook WHERE name='$getpic'";The * means select all fields in the table
Posted 06 May 2006 - 05:20 PM
so this wwont work select * from table where name=$name AND username
Posted 06 May 2006 - 06:23 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users