php - forms & database insert

Hello.

I would like to ask for some help.

I have form with about 30 edit boxes(inputs). First i need to load data from Oracle database, then check, if the database table is empty or there is any record(probably one). If is empty, then insert data, else update the row.

Please, can you give me links to any suitable example?

Thanks

Zvejk

there are a number of good tutorials on working with databases online (See codewalkers, Zend, O’Really, PHPfreaks, webmonkey, and many others) By connecting to Oracle you will be using the Oracle database functions ( http://www.php.net/manual/en/ref.oracle.php ) rather then the MySQL functions. So instead of connecting - you log on, instead of selecting a database you open a cursor. Same basic things - just named different. The ora-open function looks like it has the basic setup given in the user notes. I would look at some of the examples on the oracle functions pages and see how they corrolate to the mysql functions. Then you can look at all the mysql database tutorials and see how to incorporate the Oracle insetead.

Make sense?

this looks sort of like the answer I was looking for, except I’m mysql. I’ll check codewalkers.

Shrubwater -
codewalkers "Creating Dynamic websites with PHP and MySQL is a REALLY good primer for databases (I always recommend it to beginners in database). It takes you from installation of the software (you can always skip that part) to all the basic/common database functions and shows you how to use them in a real scenerio. If you want some links to general DB informtion (Design and queries) let me know. I have a couple up my sleeve.

liq,

Sure would. I have been reading the codewalker tutorials and have found them very helpful. Anything you can add to that would be great.

DB info links:

Database Design:
http://www.geekgirls.com/menu_databases.htm --> do the database design from scratch lessons. You will never regret it

SQL tutorial:
http://www.sqlcourse.com/ --> basic ANSI SQL (none DB specific). http://sqlcourse2.com/ --> More advanced ANSI SQL
With these you will learn SQL that can be used on any database (MySQL, Oracle, Access). Granted each one has minor variations but these will get you 95% there.

Wow! Great stuff. Looks like I got some reading to do! :)

Sponsor our Newsletter | Privacy Policy | Terms of Service