taz321 Posted March 13, 2008 Share Posted March 13, 2008 Hi I was wondering if anyone can help me - 1) I have a helpdesk system where a user would fill in an blank query form and submit to a works queue. 2) Another user would go into the works queue and see a list of queries. 3) They would then click on a particular query and open it. 4) They would view the query and add their own comments to the form (so updating that record) and give it an status level either resolved, unresolved or pending. 5) Once a status level is given i want that query to dissappear from the works queue as it would now be viewed on another screen i.e If pending chosen for status then it will be viewed in the pending screen. Now basically i want a query removed from the work's queue once a status level as been given I hope this is clear, any help would be grateful Thanks Quote Link to comment Share on other sites More sharing options...
MatthewJ Posted March 13, 2008 Share Posted March 13, 2008 You seem to have the logic just fine... You have a status variable, you select all your records where the status is equal to pending... so when you update the status to something else, it will not be a result as its status is no loneg pending. I'm confused, are you just asking someone to write it? Quote Link to comment Share on other sites More sharing options...
soycharliente Posted March 13, 2008 Share Posted March 13, 2008 Isn't that question answered your last topic about this? You posted something similar here. It looks like the answer to your question is in there. Quote Link to comment Share on other sites More sharing options...
taz321 Posted March 13, 2008 Author Share Posted March 13, 2008 Yeh i saw the response to my last post and i got the sql bit working now (dumb i know lol). Im not quite understanding whether or not it was answered in my last post. Basically i will have 4 screens. 1) one screen will contain all the queries that have been issued. 2) The other 3 screens will each contain a list of queries relating to their status. eg one screen will contain all resolved, another pending and another unresolved. 3) Basically in point one, i want to give all queries an status, and once that happens id want that query to dissappear from that screen so it looks like that all the queries have been answered, a blank screen would mean all queries have been answered. Im sure its a simple sql query if i think about it ? Quote Link to comment Share on other sites More sharing options...
soycharliente Posted March 13, 2008 Share Posted March 13, 2008 Both posts from ohdang888 on the other topic answer that question perfectly. Quote Link to comment Share on other sites More sharing options...
taz321 Posted March 13, 2008 Author Share Posted March 13, 2008 Sorry, i was having a memory lapse, after thinking about it, it seems alot more clearer. Thanks, i think i can manage now Quote Link to comment Share on other sites More sharing options...
taz321 Posted March 13, 2008 Author Share Posted March 13, 2008 I have just inserted a new row called read in my database and my SQL query is fine, but my system is not accepting it. Any reason ? Is mySQL quite volatile to new rows been inserted halfway through Thanks Quote Link to comment Share on other sites More sharing options...
taz321 Posted March 13, 2008 Author Share Posted March 13, 2008 This is my SQL statement $query = "SELECT * FROM form WHERE read = 'no' ORDER BY formID DESC LIMIT $offset, $limit"; This displays all queries in the works queue. Thanks Quote Link to comment Share on other sites More sharing options...
soycharliente Posted March 13, 2008 Share Posted March 13, 2008 READ is a reserved word in MySQL. You MUST apply backticks around it to avoid problems. http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html That's one reason you apply backticks around your table and field names. You never know when you'll use a word you aren't supposed to. $query = "SELECT * FROM `form` WHERE `read` = 'no' ORDER BY `formID` DESC LIMIT $offset, $limit"; Quote Link to comment Share on other sites More sharing options...
taz321 Posted March 13, 2008 Author Share Posted March 13, 2008 excellent Thanks, iv changed it to viewed now so hopefully that should work. 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.