denoteone Posted January 27, 2008 Share Posted January 27, 2008 I am trying to write A query were it returns the value of a row. //this is were I am having the most trouble. query="(SELECT*from strata_links path description were name=$choice.) so in the php the variable $choice is set by the _POST and I would query fore the value of "path and "description" were field id "name" is equal to $choice. I then would like to output it to the browser. any help would be awesome. thanks Denoteone. Quote Link to comment https://forums.phpfreaks.com/topic/88071-php-and-mysql/ Share on other sites More sharing options...
revraz Posted January 27, 2008 Share Posted January 27, 2008 I can't understand what you mean. State your: Table Name Field Names $choice contents You want something like this SELECT * FROM tablename WHERE name = '$choice'; The * grabs all the data from all the fields. If you just want path and description: SELECT path, description FROM tablename WHERE name = '$choice'; Quote Link to comment https://forums.phpfreaks.com/topic/88071-php-and-mysql/#findComment-450595 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.