From: <jhe...@us...> - 2002-08-05 08:11:04
|
Update of /cvsroot/upcase-project/UpCase/lib In directory usw-pr-cvs1:/tmp/cvs-serv27897 Added Files: sql2php.sh Log Message: helper script that convert a sql file in a php file --- NEW FILE: sql2php.sh --- echo '<?php $tables_create = array(' sed -e 's/uc_/${tblprefix}/g' \ -e 's/CREATE/"CREATE/' \ -e 's/MyISAM;/MyISAM;",/g' \ -n -e '/CREATE/,/MyISAM/p' $1 echo '); ' echo '$table_insert = array(' grep INSERT $1 | sed -e 's/uc_/${tblprefix}/g' \ -e 's/INSERT/"INSERT/g' \ -e 's/);/);",/g' echo '); ' echo '?>' |