Jump to content

Search the Community

Showing results for tags 'single value'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. I have only a little experience in interfacing PHP with MySQL, I'm trying to grab a single value from a database, specifically the name of an item stored with its details, in the following code I attempt to call the items name from the [Part_Name] column, for the given ID number in [PartID]. $query = "SELECT `Part_Name` FROM `".$list."` WHERE `PartID` = ".$partid.";"; $itemname = mysql_result(mysql_query($query), 0, 0); echo "<p>This will delete the item: "; echo $itemname; echo ". Are you sure you want to do this?</p>"; The resulting line says: [This will delete the item: . Are you sure you want to do this?]. ---------- Also, I tested that MySQL line and it output this: +-----------+ | Part_Name | +-----------+ | screen | +-----------+ if that helps at all, I've tried changing the row and field values in mysql_result() but haven't had any success, am I using it wrong? ---------- Can anyone point me in the right direction? Thanks
×
×
  • 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.