Jump to content

need to store a database variable in a php variable


fsl4faisal

Recommended Posts

i need to store a variable from database like if i have "copies" in one of my column in my database then i have to store a particular value for copies store it to $copies

here i want that i can store value of copies into $copies

 

$update_book="update book set copies=copies-1 where bookid='$bookid'";
        $result=mysql_query($update_book,$linkID1);
            if($result)
            {
            print "<html><body background=\"header.jpg\">
            <p>book successfully subtracted from database</p></body></html>";
            }
            else {
            print "<html><body background=\"header.jpg\">
            <p>problem occured</p></body></html>";
            }

    }

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.