Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

New PHP/MySQL Connection extension doesn't show tables. What's the next step?

New Here ,
Dec 02, 2007 Dec 02, 2007

Copy link to clipboard

Copied

I'm creating Dreamweaver extensions to work with my CMS. Since it is already connecting to the MySQL database I'd like Dreamweaver to access the same connection without asking the developer for the MySQL credentials again. I have created the HTML form, the EDML for the connection script, and the JavaScript to stitch it together, and I can successfully create connections. The connection script looks good but when I try to expand the tables in the database window it doesn't post a request to the server and it just shows "None". I have a regular PHP MySQL connection on the same site which works fine.

I feel like I'm missing a required next step which would tell it how to enumerate tables. It would be ideal if I could plug into the existing PHP MySQL code for this.

I would really appreciate any help and/or pointers!
TOPICS
Extensions

Views

736
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 02, 2007 Dec 02, 2007

Copy link to clipboard

Copied

"zymsys" <webforumsuser@macromedia.com> wrote in message
news:fiuho4$ao8$1@forums.macromedia.com...
> I'm creating Dreamweaver extensions to work with my CMS. Since it is
> already
> connecting to the MySQL database I'd like Dreamweaver to access the same
> connection without asking the developer for the MySQL credentials again.
> I
> have created the HTML form, the EDML for the connection script, and the
> JavaScript to stitch it together, and I can successfully create
> connections.
> The connection script looks good but when I try to expand the tables in
> the
> database window it doesn't post a request to the server and it just shows
> "None". I have a regular PHP MySQL connection on the same site which
> works
> fine.
> I feel like I'm missing a required next step which would tell it how to
> enumerate tables. It would be ideal if I could plug into the existing PHP
> MySQL code for this.
>
> I would really appreciate any help and/or pointers!


Are you using the Database access functions?
http://livedocs.adobe.com/dreamweaver/8/apiref/07_mmd31.htm

MMDB.getTables()
http://livedocs.adobe.com/dreamweaver/8/apiref/07_mmd42.htm

MMDB.getColumns()
http://livedocs.adobe.com/dreamweaver/8/apiref/07_mmd34.htm


Or are your trying to create a new Connection Type for the
PHP_MySQL_ServerModel or a whole new servermodel alltogether?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 02, 2007 Dec 02, 2007

Copy link to clipboard

Copied

quote:

Originally posted by: Newsgroup User
Or are your trying to create a new Connection Type for the
PHP_MySQL_ServerModel or a whole new servermodel alltogether?


Yes, I'm trying to create a new connection type for the existing "PHP MySQL" server model. I just had a small breakthrough! It seems I have to define both the connection string and the individual attributes in the connParams object returned by findConnection. I tried hard-coding them into the function and it now lists the tables in the database window. Woo hoo!

My next challenge is that this information is stored in a config file on the remote server (either testing or live) and isn't necessarily copied to the local filesystem. I'm just looking for the API now which will let me load the remote config file so I can parse it for these values. I think I'm getting close!

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 02, 2007 Dec 02, 2007

Copy link to clipboard

Copied

"zymsys" <webforumsuser@macromedia.com> wrote in message
news:fiukb7$de9$1@forums.macromedia.com...
>
quote:

Originally posted by: Newsgroup User
> Or are your trying to create a new Connection Type for the
> PHP_MySQL_ServerModel or a whole new servermodel alltogether?
>

> Yes, I'm trying to create a new connection type for the existing "PHP
> MySQL"
> server model. I just had a small breakthrough! It seems I have to define
> both
> the connection string and the individual attributes in the connParams
> object
> returned by findConnection. I tried hard-coding them into the function
> and it
> now lists the tables in the database window. Woo hoo!
>
> My next challenge is that this information is stored in a config file on
> the
> remote server (either testing or live) and isn't necessarily copied to the
> local filesystem. I'm just looking for the API now which will let me load
> the
> remote config file so I can parse it for these values. I think I'm
> getting
> close!

I think you want the HTTP API
http://livedocs.adobe.com/dreamweaver/8/apiref/03_http.htm


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 02, 2007 Dec 02, 2007

Copy link to clipboard

Copied

LATEST
Thanks for the tip... Unfortunately I can't get at the database info through http for security reasons. For now I have it prompting the user to download the config file if it can't find it locally. Not as user friendly, and I'm sure there's a way to automate this, but it gets the job done for now.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines