webismymind / editablegrid-mysql-example

This example shows how to use EditableGrid with a MySQL database
MIT License
58 stars 38 forks source link

grid not displaying data #26

Open aid123 opened 9 years ago

aid123 commented 9 years ago

Hi, great tool, thank you.

Please help. I'm trying to just display one column of data (the first), not all the columns. When I comment out all addColumn lines except the first column (using your demo), then no data is displayed in the grid.

It appears only if I include the columns 'country' or 'continent' does the grid show results. If I exclude both those columns, the grid returns no rows, even though the other columns are there.

Thanks

NicksMacLife commented 9 years ago

you need to change the line with

This is in the loaddata.php file

$result = $mysqli->query('SELECT *, date_format(lastvisit, "%d/%m/%Y") as lastvisit FROM '.$mydb_tablename );

to

$result = $mysqli->query('SELECT * FROM '.$mydb_tablename );

Let me know if that works

aid123 commented 9 years ago

Hi, thanks but it still doesn't work.

-------- Original message --------
From: nickmacwiz
Date:27/10/2015 1:11 AM (GMT+02:00)
To: jybeaujean/editablegrid-mysql-example
Cc: aid123
Subject: Re: [editablegrid-mysql-example] grid not displaying data (#26)

you need to change the line with $result = $mysqli->query('SELECT *, date_format(lastvisit, "%d/%m/%Y") as lastvisit FROM '.$mydb_tablename );

to

$result = $mysqli->query('SELECT * FROM '.$mydb_tablename );

Let me know if that works


Reply to this email directly or view it on GitHub: https://github.com/jybeaujean/editablegrid-mysql-example/issues/26#issuecomment-151310532

NicksMacLife commented 9 years ago

Are you trying to pull the data from the first column of the demo database or another database?

NicksMacLife commented 9 years ago

If you are still using the demo database. attach your loaddata.php file and if not please upload your loaddata.php file and a screen shot of your sql table from myphpadmin.

aid123 commented 9 years ago

The same demo database. Even having just the first few columns doesn't return results. Only if country or continent are included does the grid return data.

Many thanks

-------- Original message --------
From: nickmacwiz
Date:27/10/2015 5:09 PM (GMT+02:00)
To: jybeaujean/editablegrid-mysql-example
Cc: aid123
Subject: Re: [editablegrid-mysql-example] grid not displaying data (#26)

Are you trying to pull the data from the first column of the demo database or another database?


Reply to this email directly or view it on GitHub: https://github.com/jybeaujean/editablegrid-mysql-example/issues/26#issuecomment-151534348

NicksMacLife commented 9 years ago

I just tried taking the oritional project and removing those 2 and it works fine. Please upload you loaddata.php file so i can take a look

aid123 commented 9 years ago

Hi, I see it does work in IE, but not in chrome. I've been using chrome as my preferred browser, hence the problem.

It only works in chrome when all columns including country and continent are included.

Are you able to fix this?

Thanks

-------- Original message --------
From: nickmacwiz
Date:27/10/2015 5:22 PM (GMT+02:00)
To: jybeaujean/editablegrid-mysql-example
Cc: aid123
Subject: Re: [editablegrid-mysql-example] grid not displaying data (#26)

I just tried taking the oritional project and removing those 2 and it works fine. Please upload you loaddata.php file so i can take a look


Reply to this email directly or view it on GitHub: https://github.com/jybeaujean/editablegrid-mysql-example/issues/26#issuecomment-151538611

NicksMacLife commented 9 years ago

I have only been using Chrome and Firefox sometimes.

Sent from my iPhone 6 Plus

On Oct 27, 2015, at 11:28 AM, aid123 notifications@github.com wrote:

Hi, I see it does work in IE, but not in chrome. I've been using chrome as my preferred browser, hence the problem.

It only works in chrome when all columns including country and continent are included.

Are you able to fix this?

Thanks

-------- Original message --------
From: nickmacwiz
Date:27/10/2015 5:22 PM (GMT+02:00)
To: jybeaujean/editablegrid-mysql-example
Cc: aid123
Subject: Re: [editablegrid-mysql-example] grid not displaying data (#26)

I just tried taking the oritional project and removing those 2 and it works fine. Please upload you loaddata.php file so i can take a look


Reply to this email directly or view it on GitHub: https://github.com/jybeaujean/editablegrid-mysql-example/issues/26#issuecomment-151538611 — Reply to this email directly or view it on GitHub.

NicksMacLife commented 9 years ago

Do you have the ability to check another computer with chrome.

Sent from my iPhone 6 Plus

On Oct 27, 2015, at 11:28 AM, aid123 notifications@github.com wrote:

Hi, I see it does work in IE, but not in chrome. I've been using chrome as my preferred browser, hence the problem.

It only works in chrome when all columns including country and continent are included.

Are you able to fix this?

Thanks

-------- Original message --------
From: nickmacwiz
Date:27/10/2015 5:22 PM (GMT+02:00)
To: jybeaujean/editablegrid-mysql-example
Cc: aid123
Subject: Re: [editablegrid-mysql-example] grid not displaying data (#26)

I just tried taking the oritional project and removing those 2 and it works fine. Please upload you loaddata.php file so i can take a look


Reply to this email directly or view it on GitHub: https://github.com/jybeaujean/editablegrid-mysql-example/issues/26#issuecomment-151538611 — Reply to this email directly or view it on GitHub.

NicksMacLife commented 9 years ago

what verison of php are you using on your server?

aid123 commented 9 years ago

php 5.5.12using chrome Version 46.0.2490.80 mon windows 8mySql 5.6.17

Date: Tue, 27 Oct 2015 12:21:53 -0700 From: notifications@github.com To: editablegrid-mysql-example@noreply.github.com CC: a_hendler@hotmail.com Subject: Re: [editablegrid-mysql-example] grid not displaying data (#26)

what verison of php are you using on your server?

— Reply to this email directly or view it on GitHub.

NicksMacLife commented 9 years ago

same setup on my end except i am using a different mysql but that wouldnt make a difference.

if you can upload or copy paste your loaddata.php file so i can see whats going on.

also try uninstalling and reinstalling chrome.

aid123 commented 9 years ago

I finally figured it out. I must have done a search using a filter in the past, and the filter didn't clear, even though the filter box was empty and I was refreshing using shift+F5 each time. I've had to add the below into the initialiseGrid function.grid.currentFilter = ""; Date: Tue, 27 Oct 2015 12:35:16 -0700 From: notifications@github.com To: editablegrid-mysql-example@noreply.github.com CC: a_hendler@hotmail.com Subject: Re: [editablegrid-mysql-example] grid not displaying data (#26)

same setup on my end except i am using a different mysql but that wouldnt make a difference.

if you can upload or copy paste your loaddata.php file

so i can see whats going on.

also try uninstalling and reinstalling chrome.

— Reply to this email directly or view it on GitHub.