0

Hi there,

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 :)

3
Contributors
4
Replies
17
Views
3 Years
Discussion Span
Last Post by veedeoo
0

Because I am brand new to using databases and assumed that MySQL cost money. Is there a free version I should/could be using? If so could you possibly point me in the right direction of that. I am loooking at the MySQL sight and it looks like the cheapest product is $2,000 XD

I appreciate the response.

Edited by deadsolo

0

Please Ignore this answer and read my response below.

Edited by veedeoo: info added.

0

MySQL server is free of charge, try downloading uniserver Zero here. This is a whole package of apache, mysql, PHP and many other useful modules.

Edited by veedeoo: info added.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.