Page 1 of 1

Lazy or usefull tool?

Posted: Wed Apr 06, 2005 1:28 am
by Malace
Hello,

I've been programing for close to 8 years now. Trying most every language I could comprehend enough to teach myself. My latest task has been grasping php. Which hasn't been a fruitless effort by any means.

However I have hit a snag. Perhaps its just me though. So I need to ask if anyone else has a heated hatred for writing update, delete, and insert querys within their scripts. I consistantly run into syntax errors while doing so. Probably simple mistakes, inccorect quotes around something, or using the wrong format ect.

To retaliate I was considering writting a development tool. One which I think might gather allot of php newbie intrest. Yet still a simple script which could save pro's time while working on their own projects.
The program would run similiar to the following step process.
1. Ask user to input the database and table to be used.
2. Ask the user how many fields they would like to add,upd,or del. (as well as which method)
3. Generate a page with 2 text fields per field(s) desired.
4. In the fields the user would enter the table field to target. With the second field the user would enter the variable name they wish to insert, update, or delete in said targeted table value.
5. Once the prior page is submitted display the correct syntax for their update, delete, or insert query. Preferably in an easy to cut a paste style.

If nothing else. Im tired enough of looking for errors in querys. To make this for myself. However I can't quite figure out the logic of how to print the users input correctly within a query string. If anyone finds this idea to be worth while pls state so with any features you would like to see. As well if anyone would like to help reply here or msg me on aol_im Crank2003

Posted: Wed Apr 06, 2005 1:51 am
by feyd
maybe you should look up adodb, or some of the other database abstraction style "tools" ...

Posted: Wed Apr 06, 2005 2:17 am
by n00b Saibot
I have already have such a system (written in PHP & JScript, developed wholly by me) in place except for the fact that it uses IE's DOM+DHTML Methods and as such I not sure whether it will useful for everyone.

I'm sure you can also achieve such a system by abstraction and such OOP concepts. Any help required, and we are here to help. Go on..;)

Posted: Wed Apr 06, 2005 7:39 am
by timvw
i wrote a class that generates most of the standard queries on a sql table.
but it is open for improvements and needs some fixes... http://timvw.madoka.be/programming/php/ ... le.php.txt

at http://timvw.madoka.be/test/ there is a php4 version and a sample of a concrete implementation of the class...

(but my arm hurts a lot right now, so it's hard to type or write code....)


i hope it can inspire you ;)