472,784 Members | 981 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,784 software developers and data experts.

bash script that generate PHP from SQL

as i write on the topic, i'm programing a Bash script using the
standard GNU Linux text utilities (gawk, grep, sed, and so on) that get
information from SQL source (table attib, type per column, constrains,
etc.) and finally generate PHP codification.

This is not a magic tool that makes whole site from SQL tables, but i
just want to make easy repetitive task. Almost every table on a
database has certain page asociatted, ex.:

from Company relation (table) we should, for sure, do:
(1) company-index.php // just links to other pages
(2) company-query.php // perform company data filter
(3) company-insert.php // insert a new company
(4) company-delete.php // delete
(5) company-browse.php // browse (all or filtered) brief companies data
(6) company-update.php // update
(7) company-detail.php // show every
(8) company-operation.php // SQL queries

This example could also be apply to Customers, Suppliers, and so on.
I just want to know if someone would like to join this project. It'd be
publicated under GNU/GPL license. Thoughts are welcome!!..

thanks in advance

Jul 17 '05 #1
1 1914
Gonzalo Aguirre wrote:
as i write on the topic, i'm programing a Bash script using the
standard GNU Linux text utilities (gawk, grep, sed, and so on) that get
information from SQL source (table attib, type per column, constrains,
etc.) and finally generate PHP codification.

ehh, why?

write the site in PHP, and just fetch the properties from the
database. Why are you wasting time writing script to generate scripts?

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Bernhard Kuemel | last post by:
Hi! To relief the problems of accessing a unix machine from behind a restrictive firewall or from an internet cafe I started to make a PHP web interface to bash. I'd like to hear your opinions...
by: Phil Powell | last post by:
I'm sorry but I can't figure out how to explain this any better than this. In PHP we have a command "require()" that obtains a file and logically places it into another file. I cannot figure...
by: Tom Purl | last post by:
I just wrote a Python script that is going to be called from bash script. If the Python script fails, I want the bash script to also stop running. Unfortunately, I can't seem to get that to work. ...
by: Magnus Jonneryd | last post by:
Hi, I'm planning on writing a program that interactively is fed input via a shell (bash). I also want to be able to write a shell script that executes various commands related to my program. In...
by: Synapse Syndrome | last post by:
Hi I've been given what I am told is a PHP script to be used on my server. I do not know any PHP. I am trying to use a feature of a program called ArchiCAD. This feauture allows CAD drawing...
by: Ishpeck | last post by:
I'm using Python to automate testing software for my company. I wanted the computers in my testing lab to automatically fetch the latest version of the python scripts from a CVS repository and...
by: melmack3 | last post by:
Hello My PHP script executes many bash/cmd commands. Functions like "exec()" or "system()" cause that new bash/cmd session is started, the command is executed and the session is closed....
by: Gros Bedo | last post by:
Yes I've seen that each python script calls its own instance of Python. Buthow to know which is the good one in bash ? Is there a command that gets the parameters of process, so I could use grep to...
by: norseman | last post by:
Gros Bedo wrote: ============================== Yes. man ps explains try ps -AFL | grep then kill -9 found (check it more than twice) 1) If your script is known to hang use what...
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.