Closed GoogleCodeExporter closed 9 years ago
This actually makes sense. Adding to TODO list.
Original comment by ondrej.zara
on 28 Aug 2012 at 12:19
Thanks, I think it will make readability much easier and more intuitive.
Anything I can do as a thank you in return?
Original comment by tjachimc...@gmail.com
on 28 Aug 2012 at 11:13
Hi mate,
As a quick thank you, I put together some more detailed instructions for
you on how to enable loading and saving from a database which you might
want to add to your installation wiki notes.
*To enable the Load and Save features using a database, you will need to
perform the following tasks:
Ensure that you have a working webserver (Such as WAMP for Windows, MAMP on
Mac etc) enabled on your desktop or the PC you will be working off.
You will then need to create a database and enable a user on it:
For PHP-MySQL:
Once logged into the console, create a database that the application will
use:
mysql> create database sqlDesignerExample;
Query OK, 1 row affected (0.03 sec)
Ensure that you switch to the database you just created:
mysql> use sqlDesignerExample;
Database changed
mysql> DROP TABLE IF EXISTS `wwwsqldesigner`;
Query OK, 0 rows affected, 1 warning (0.03 sec)
Run the SQL in the sqlDesigner\backend\php-mysql folder:
mysql>
mysql> CREATE TABLE `wwwsqldesigner` (
-> `keyword` varchar(30) NOT NULL default '',
-> `data` mediumtext,
-> `dt` timestamp,
-> PRIMARY KEY (`keyword`)
-> );
Query OK, 0 rows affected (0.03 sec)
Now, create a user with the permissions as needed:
mysql> create user 'sqlExample'@'localhost' identified by
'someSuperSecretPassword';
Query OK, 0 rows affected (0.38 sec)
mysql> grant all privileges on sqlDesignerExample.* to
'sqlExample'@'localhost'
with grant option;
Query OK, 0 rows affected (0.03 sec)
Finally, update the PHP file in the same folder. You will need to make
changes to the first function as follows:
function setup_saveloadlist() {
define("SERVER","localhost");
define("USER","sqlExample");
define("PASSWORD","someSuperSecretPassword");
define("DB","sqlDesignerExample");
define("TABLE","wwwsqldesigner");
}
Save the file after you make the changes and you will now be able to load
and save using Server Backend: php-mysql*
With a little luck, that might cut down on the number of "I can't save!'
comments. Hope it helps.
- Tom
Original comment by tjachimc...@gmail.com
on 28 Aug 2012 at 11:36
Fixed in changeset 47b5eeffc5de. Thanks!
Original comment by ondrej.zara
on 29 Aug 2012 at 7:49
Hey mate,
I noticed that you put up that doc I wrote quick smart. Would you like some
extra docs for the rest of your application? I would be happy to help
collaborate and put some docs together for you - I used to do it for a
living many years ago.
Also, I am writing a snippet of code that will interrogate a database
(mysql at this point in time) to get all the entity relationships just by
entering in a database name (assuming that sufficient user privs are on the
login/pass). If you like I could give you the code which would either
output XML or return an object that defines the database - I have currently
been working around the object more so than the XML, but it would be easy
to write a function that returned the format that you use.
Original comment by tjachimc...@gmail.com
on 29 Aug 2012 at 1:15
Hi there,
1) docs - yeah, I would appreciate that. I hate writing documentation :)
2) I am not sure I understand correctly: how does your code differ from the
standard "import" feature available in certain backends, such as
http://code.google.com/p/wwwsqldesigner/source/browse/backend/php-mysql/index.ph
p#24 ?
Original comment by ondrej.zara
on 29 Aug 2012 at 4:16
Hey,
Happy to help with some docs, will send you something shortly.
As for the second part, now that I look into the code and the feature - no,
it is very much not different at all LOL. I will probably start with some
docs on that, so that other muppets like myself don't totally miss that
feature :)
Original comment by tjachimc...@gmail.com
on 29 Aug 2012 at 10:25
Okay, got a bit more for you. For the installation section:
*To Enable the Import From DB functionality using Server Backend: php-mysql
You can use the same user as above and need to modify the second function
in the same file
function setup_import() {
define("SERVER","localhost");
define("USER","sqlExample");
define("PASSWORD","someSuperSecretPassword");
define("DB","information_schema");
}
You do not need to assign any other special permissions to this user, even
if it is going to import other databases from the server.*
Also, I am putting together a quick walkthrough of the features and how it
all works. I assume that I can send you a word doc to show you how it is
all meant to go together, along with the seperate images and the like?
Original comment by tjachimc...@gmail.com
on 30 Aug 2012 at 11:33
Well, all the docs are in Google Docs Wiki format, so that would be preferable.
If you want, I can add you as a project member: you will be then able to adjust
the wikipages yourself...
Original comment by ondrej.zara
on 31 Aug 2012 at 1:08
Sounds great mate,
Pop me on and I am happy to finish off the docs for the project and also
maybe contribute in other ways.
Original comment by tjachimc...@gmail.com
on 31 Aug 2012 at 2:25
Original issue reported on code.google.com by
tjachimc...@gmail.com
on 28 Aug 2012 at 4:57