mysql
Eljacko876 asked:


I have been able to read data from my mysql database, However i find it hard to find documentation on creating an interface to write back to your Mysql database. Can u point me to a source with that specific info, or just give me general advice.

Comments

tatata24 on 21 November, 2008 at 4:25 pm #

First make sure the folder is not set to read-only and that write is enabled. Same goes for the database.

You didn’t mention what Server Side Scripting language you’re using. If it’s PHP then take a look at this page to insert data into tables

Here’s the page for adding records to a table in ASP


Mehdi on 23 November, 2008 at 7:00 am #

That depends on two things:

1. In what language? (VB, VB.Net, Asp, Asp.Net, PHP)
2. What do you consider an “interface”?

When talking about MySQL, I assume you’re using a PHP based web interface… in which case a form and processing page are all you need. The form to enter what you need in the database, and the processing page to do the actual transfer to the database.

Inserting isn’t much different from selecting; all you have to keep in mind that the processing page should have some intelligence built in to not simply dump any input into a table.

A simple “INSERT INTO tblWhatever (field1, field2) VALUES (” . [form field1], [form field 2] . “)” is all you need, using the regular mysql_query command to *do* the insert.

Just make sure you do some verification of data, to ensure you’re not allowing SQL Injections that could compromise your site.

Check this page: , and be sure to check out the list of commands on the left.

If you have MySQL installed on your local computer, consider getting a copy of SQLYog Community Edition, a simple query/database analyzer that allows you direct access to the database, for easy correction and verification of data.


Post a Comment
Name:
Email:
Website:
Comments: