SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Dec 2004
    Location
    Telford, UK.
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    $Strings in mysql query

    PHP Code:
    // SESSION DATA
    $memberid $_SESSION['id'];
    $caseid $_GET['caseid'];

    // SELECT DATA FROM DATABASE  

    $sql 'SELECT * FROM `paralog_casereview` WHERE `id` = 1 AND `memberid` = 2 LIMIT 0, 30 '

    How do I get the values of "1" and "2" in the sql query to be replaced with the variable strings $memberid and $caseid?

    I've tried inserting the strings between two "

    I've tried inserting the strings between two `

    I've tried inserting the strings between two '

    I've tried replacing values with the Strings directly without quotes of any kind.

    All failed.

  2. #2
    SitePoint Zealot
    Join Date
    Dec 2004
    Location
    Telford, UK.
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    All done now.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •