Jump to content

mysql and php display..


corillo181

Recommended Posts

ok.. i havent got this one ..

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..
Link to comment
Share on other sites

i know.. select all but after i put that i have to put a variable that makes up for what i'm looking for and i don't want to make up a variable i simply want to get a value from the database

so this wwont work select * from table where name=$name AND username
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.