Jump to content

loading one user by thre id value in php


hansolo
 Share

Recommended Posts

can i load a users information from my sql by there id number .is that possible. I am currnlty loading all the users . i like to seect on and information while(result = mysql_fetchArray(SELECT * FROM 'table')) i currenyly using the asterisk which select all i like to select o user and there information

Link to comment
Share on other sites

you can use 'where' clause to get particular id and you can specify the particualr fields by comma separated field names.

Link to comment
Share on other sites

wonder if this is possibleok thanks if saved an id number in a varaible . I could possibly use this to search automatically . If user had an id and number and stored it in global varaible i could post this back to my sql and this could be used to make the search on the users information global posted varaible from flash $userid=[_postUserId] // this could send the id number from flash $UserId = $_POST["flashid"]; // in thoery icould use the global varabile to make a search based upon the store varaible with user idas an example SELECT FROM 'table', $UserId

Link to comment
Share on other sites

hmm.. not sure this one is gonna work: SELECT FROM 'table', $UserId you are proberly going to get an error i think...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...