truegilly Posted December 13, 2006 Share Posted December 13, 2006 Hi,Wondering if any of you gurus can give me an insight into this one.Ive got a page which allows a logged in user to upload and delete files. One of the constraints I want to implement is so a user can only store a maximum of 20mb of data within my database. The files are stored as BLOBsThe way I have been trying to get this working was by using the query below and storing the value it returns in a PHP variable, and then using an if statement to test weather the user has enough space to upload files, else it provides an error message that says "sorry no space". The problem ive got is that im not sure how to assign the result of this query into a variableHere is my Query and the code that goes with it[color=navy]SELECT SUM(dbArtefactFileSize) AS FileSizeAllowence, dbArtefactId, dbArtefactFileSize, dbArtefactFileType, dbArtefactFileName FROM Artefact WHERE dbEmployeeId = ? GROUP BY dbEmployeeIdmysqli_stmt_bind_param($statement, "s", $_SESSION['sessOwner']['UserId'] ); mysqli_stmt_execute($statement);[/color]Could anyone provide the code that allows me to store the result in a variable ??Any help is most appreciatedTruegilly Quote Link to comment Share on other sites More sharing options...
fenway Posted December 16, 2006 Share Posted December 16, 2006 I'm not familiar with this DB class, but I assume there's a way to get back that SUM() expression, and once you're in PHP, do whatever you please. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.