Jump to content

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/88071-php-and-mysql/
Share on other sites

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';

Link to comment
https://forums.phpfreaks.com/topic/88071-php-and-mysql/#findComment-450595
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.