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?