First off sorry for long wall of text, I just want to give as much context as possible so someone might be able to help me out.
I am trying to create a simple helpdesk/ticket system using xampp/php/odbc/and a text file as my database the issue comes from updating tickets. First time I've done anything with databases. From what I found online I needed to use an ODBC driver to interface my xampp/php side with my text file database. I don't really understand what ODBC does after reading about it for awhile other then it lets various types of databases talk to each other?
I have Googled around and have not been able to find many people using .txt files as a database source, but since I was able to get the INSERT stuff working I assume this should be possible. If someone has a suggestion/reasons why I should use something other then just a text file for my simple database let me know (please note though that I do not want to spend money on this little project).
I found one article from Microsoft saying that ,"ODBC drivers do not allow for the SQL statements UPDATE and DELETE." However it seems like there has to be some way for me to Update my text database.
Currently what I am trying to do since UPDATE doesn't work is just create a new ticket that is the same as the old ticket plus the new updates. However I am getting an error that I can't figure out:
SQL error: [Microsoft][ODBC Text Driver] Syntax error in INSERT INTO statement., SQL state 37000 in SQLExecDirect
The code I am using is:
q2 = "INSERT INTO TicketDB.txt (ticketId, fullName, email, issue, assignedTo, status, dateCreated) VALUES ($ticketId, '$email', '$issue', '$assignedTo', '$status', $dateCreated)"; r2 = odbc_exec($dbc, $q2);
I use an almost completely identical code when I originally create the ticket. I have tried using the exact same code as when I originaly create the ticket and get an error from that too.
Any and all help is greatly grealty appreciated.
Thanks for getting through this long post is if you actually read all this btw :)