Jump to content

PHP and mySQL


denoteone

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.