Jump to content

Can I do mysql/php stuff inside of a Wordpress page???


tvance929

Recommended Posts

I am fairly new to php / mysql and have a friend who wants me to create a datagrid of some sort in her wordpress site. 

 

I know that wordpress already connects to it's own mysql database to get all it's info, so my question is....can I create a second connection inside of that already existing wordpress php page so I can pull and save her data to her other mysql?

 

IF this is doAble, could someone suggest a datagrid that I could use?  I have seen the PHP datagrid page and it looks like more than enough but my big question was if it was even able to connect.

 

Any other thoughts or comments I should know?

 

 

 

While it probably can be done, i would suggest using wordpress existing tools and/or a plugin first.

 

http://wordpress.org/extend/plugins/

Try asking google and wordpress forum, some plugin may not have the name you think or some plugin may exist outside wordpress.org

 

If no built-in function or plugins exist that allow you to do what you want, which i doubt that, someone probably ran into a similar problem to yours and make a plugin for it.

 

The proper way will be to write a plugins for wordpress for your need and use it instead of sneaking some code in that, some code that may break on next wordpress version update.

 

I don't know wordpress world and plugin but you can tell exactly what your need are here, someone may know the right plugin/addon for it.

Thank you!  I did exactly that and found a WP Plugin that processes PHP tags inside of your posts or pages and its working perfect! 

 

 

THANKS!

 

***FYI - its called EXEC-PHP and the plugins site is here. http://bluesome.net/post/2005/08/18/50/

 

I have suggest to find a plugin to do the datagrid for you instead of writing php code.

 

Finding a plugin for a datagrid will be probably faster than write your own php code and it will be probably more secure and have more options that you can think of.

 

A plugin will also probably be updated in the future to work with future version of wordpress. Easier to download the new wordpress/plugin version than working with your php code that broke with the new update.

 

But if it works the way you want...enjoy :)

No that would be a great idea if I could find one.  I was surprised to not find any datagrid plugin's made just for wordpress.

 

I am planning on inserting a premade php datagrid into my EXEC-PHP plugin.  But ya, it would sure be nice if someone could come up with a wordpress datagrid.  I found one (or maybe two) that organize posts and things INSIDE of the admin area but that has nothing to do with what I want. 

 

I need real data on the page for viewers, not backend stuff and cannot find one.  HAS anyone had any experience with this datagrid  http://www.apphp.com/php-datagrid/index.php

  • 2 weeks later...

When I need to create custom php code for a WP page, it is farily simple to create a template and insert it into the page. Read more about that here >

http://www.wordpressmax.com/customize-wordpress/custom-page

I am not pleased with the current set of insert php code plugins that are available.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.