How would I UPDATE these table entries with SQL and PHP?
Posted
by CT
on Stack Overflow
See other posts from Stack Overflow
or by CT
Published on 2010-05-24T03:29:26Z
Indexed on
2010/05/24
3:40 UTC
Read the original article
Hit count: 338
I am working on an Asset Database problem.
I enter assets into a database. Every object is an asset and has variables within the asset table. An object is also a type of asset. In this example the type is server.
Here is the Query to retrieve all necessary data:
SELECT asset.id
,asset.company
,asset.location
,asset.purchaseDate
,asset.purchaseOrder
,asset.value
,asset.type
,asset.notes
,server.manufacturer
,server.model
,server.serialNumber
,server.esc
,server.warranty
,server.user
,server.prevUser
,server.cpu
,server.memory
,server.hardDrive
FROM asset
LEFT JOIN server
ON server.id = asset.id
WHERE asset.id = '$id'
I then assign all results into single php variables.
How would I write a query/script to update an asset?
© Stack Overflow or respective owner