Data Binding with MySQL

I need to show data from a MySQL database that is online.  The wepage should show the data and also enable users to log-in and delete records.  In other words, there should be a form that can be customized, display the data and allow records to be deleted online for end-users.  

I have a few constraints that won't allow me to use any solution:
1. I need something that is already built or maybe some software would make this easy to build.
 I'm willing to spend upto $90.  So maybe an open source solution would be possible.

2.  My web hosting company does not allow remote connections to the My SQL database.  
I tried to use PHP-mySQL Wizard available at: http://www.softgalaxy.net.  However, I couldn't use this because my webhosting company doesn't allow remote connections to the My SQL database. In other words, it can't be configured using a remote connection.  Also, I had similar results with Dreamwever. Please note that I can access the MySQL database online- I have an application online that is using the MySQL database.

3. I don't want to spend a lot of time learning Php etc programming, so I need a wizard or some open source code that can help me build this quickly.
LVL 1
jjrr007Asked:
Who is Participating?
 
dr_dedoConnect With a Mentor Commented:
i do recommend this free tool, very easy to customize, with minimal code and many examples
http://www.gurusistemas.com/indexdatagrid.php

if what you want is something like this
http://www.gurusistemas.com/samples/sample8.php
then this tool is for you, best thing is it is FREE :)
0
 
emphamyCommented:
check out a few of these links, pre made scripts that can help you:

http://php.about.com/od/finishedphp1/ss/php_login_code.htm
http://www.wsworkshop.com/php/php-mysql-weblog.html

these are very general since i am not sure exactly whats in side the member pages, first link should be a great help.
0
 
thigger_ukCommented:
This is a free tool which claims to be able to produce what you want. I haven't used for anything major myself but had a play a while ago.

http://www.sqlmaestro.com/products/mysql/phpgenerator/
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
jjrr007Author Commented:
dr_dedo and Thigger_UK,
Does the software work with websites that do allow remote connections to My SQL?

Thanks!
0
 
jjrr007Author Commented:
Sorry I meant to say,

dr_dedo and Thigger_UK,
Does the software work with websites that do NOT allow remote connections to My SQL?
Thanks!
0
 
dr_dedoCommented:
u need to have that script on the same machine as your db !!
so you have a problem publishing files on that server ??
most mysql installations prevent remote connections, and to deal with them, you use scripts that are on the same machine.
even if you used some tool as an intermediate media between your db and a remote server, this tool would be installed on your db server !
0
 
jjrr007Author Commented:
dr_dedo,

I unzipped the files and placed them on the web server.  When I navigated to the  phpmydatagrid.class.php file and nothing happened.  Also, I tried to place the following code in a php file as well as an htm file- nothing happened.  What do you sugggest?
<?php
include ("phpmydatagrid.class.php");
?>
0
 
dr_dedoCommented:
you need to have db running, use attached sql file to create a table named employees (just to test this  script),  u can use it simply by copy and paste this SQL statements, or by mysql tool
mysql --user root -p <sqlFile.sql, or via php my admin

when done, run any sample file after changing a line that corresponds to your database, say sample 10
change line 68 in it to what suits ur db and then run the sample file.
      $objGrid -> conectadb("127.0.0.1", "root", "", "test");

there is a handful number of sample files to custom the script to ur needs and learn it

sqlFile.txt
0
 
jjrr007Author Commented:
I have created the employees table using the sql file that you provided in the mysql tool.  I'm not quite clear what to do next.  Is there a file I should change?  If so, which one...

BTW, my web server is running I believe on a Unix web server not a windows server.
0
 
dr_dedoCommented:
now that you have a database ready, pickup any sample file and run it , take for example file sample10
you need to change db login data which are found at line 68 and put your own database data and you should have the sample running
if that happened, try all the samples, till you find one that suits your needs, go to the code , change it to match your database fields
0
 
jjrr007Author Commented:
As you were typing the last message, I realized that I needed to change the samplex.php files.  If I can just get one to work, I can customize it to meet my needs.  

It seems that I need to change the line,
"      $objGrid -> conectadb("127.0.0.1", "phpclasses", "test", "guru")"  

What do I change the values, 127.0.0.1", "phpclasses", "test", "guru" to?    Do I need to change any other files (I can use the employees table that we just created for now)..
0
 
dr_dedoCommented:
change this line
$objGrid -> conectadb("127.0.0.1", "phpclasses", "test", "guru")
to
$objGrid -> conectadb("localhost", "root", "rootPassword", "databaseName")
localhost is your server
root is db user
rootPassword is the password used by root
and databaseName is the db name in which employees lies
0
 
jjrr007Author Commented:
That worked very nicely! Thank you!!!

 I tried all of the sample files.  I just have a couple things left from the question:
1. How do I password protect this page.  Only users with the correct username/password should be able to see this page and there entries?  
2.  The information needed is on a couple different tables, how do I specify a query instead of just a table?

I can customize the code to meet my needs. Thanks again.



0
 
jjrr007Author Commented:
BTW, do I need the other program the website is offering ADOdb application?
0
 
dr_dedoConnect With a Mentor Commented:
protecting files using username and password is a major issue, but u can google it as php mysql login tutorial and dozens of tutorials will show up

now, i'll talk about sample 1.php
to customize your query here, you select the table as in line 59
$objGrid -> tabla ("users"); <--- table name

as for the columns you want to select, you specify them here (line start at 62
      $objGrid -> FormatColumn("iduser", "ID Employee", 5, 5, 1, "50", "center");
      $objGrid -> FormatColumn("login", "Name", 30, 30, 0, "150", "left");
      $objGrid -> FormatColumn("senha", "Last name", 30, 30, 0, "150", "left");

the where clause could be defined as this
$objGrid ->where = " where condition";

or simply you can use your own query like this
$objGrid ->sql = "you query ";

You don't need ADOdb, it is used for windows stuff like MS access, not mySQL
0
 
jjrr007Author Commented:
Thank you very much.  This looks very good.
0
All Courses

From novice to tech pro — start learning today.