optikalefx / OpenJS-Grid

OpenJS Grid is the easiest jQuery Grid ever. With very little work you can have a data grid that can do everything from sorting and searching to complex database queries. Best of all, its open source. So you can learn how it's all done.
http://square-bracket.com/openjs
MIT License
97 stars 46 forks source link

Basic Setup/ connect to mysql #80

Open angthen opened 9 years ago

angthen commented 9 years ago

Hi!, Thank you for your quick response on your youtube channel. Again I can not dynamically display the demo db from mysql. My database is named "user" and the table is "tutorials" which I uploaded from the sample.sql file.

Here is the ajex.php code

https://gist.github.com/2c5e5fdf5b32287fef4b.git

Here is the index.html code

https://gist.github.com/116660ac189b2e8511ca.git

I am sorry that this is such a basic question.

Thanks again!

optikalefx commented 9 years ago

can you confirm that those mysql connect details are correct? Make a standalone PHP files with just those, and make a normal database call to see. Also check your PHP errors file on your computer to see if that tells you what's up.

angthen commented 9 years ago

Yes, mysql login information is correct, I tried a script to ensure connection. The PHP error says; Unknown column 'tutorials.' in 'field list'

I am receiving the same error when I also tried to replace the db with my "products" database that I am already displaying dynamically in another table.

I am hoping to replace all my tables with your grid.

optikalefx commented 9 years ago

So, according to that error, you don't have a field called "tutorials" in your table "users". But you also aren't asking for "tutorials". So can you just send me a zip of all your files for this? I don't think what you gave me in gist is what you're using for this example.

angthen commented 9 years ago

So, at this point I have managed to "somehow" make the table appear with my "products" db on your basic setup index.html link.

Now, I have copied and pasted the same exact code into my "inventorygrid.php" link and it does not work at all!

  1. The grid is only displaying the table headers
  2. It has distorted my "sidebar.php" which I am displaying dynamically (I am using the bootstrap admin theme)
  3. I feel like I have been living a lie and I have no idea what I am doing (lol)

Thanks again!

optikalefx commented 9 years ago

You’ll need to check your database creds, the fields that you’re selecting and if there are any errors in your console or PHP. Then we take it from there

On Fri, May 29, 2015 at 2:30 PM angthen notifications@github.com wrote:

So, at this point I have managed to "somehow" make the table appear with my "products" db on your basic setup index.html link.

Now, I have copied and pasted the same exact code into my "inventorygrid.php" link and it does not work at all!

  1. The grid is only displaying the table headers
  2. It has distorted my "sidebar.php" which I am displaying dynamically (I am using the bootstrap admin theme)
  3. I feel like I have been living a lie and I have no idea what I am doing (lol)

Thanks again!

— Reply to this email directly or view it on GitHub https://github.com/optikalefx/OpenJS-Grid/issues/80#issuecomment-106897989 .