Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Nedeľa, 29. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Empty Table on View/Change Screens After 1st Record?

phpMyEdit Installation     Empty Table on View/Change Screens After 1st Record?
Odoslať novú tému   Odpovedať na tému    
 
Dave-Just-Dave     Založený: 08.01.2004   Príspevky: 5  
Príspevok Zaslal: 2004-01-08 19:55
Návrat hore  Odpovedať s citátom     

...

I setup a simple test database and installed phpMyEdit as per the instructions. Almost everything seems to work fine. I can add multiple records, and they show up in the main table just fine.

However, when I go to View/Change any record other than the first one, I get a blank table, with only the normal headers and footers displayed (with the save/cancel buttons, et cetera). The table HTML in the page is:

<table class="pme-main" summary="test_table">
</table>

Thoughts? I assume I'm doing something stupid, but I can't figure out what the problem is.

Thanks!
[/url]

 
hbernard     Založený: 23.03.2003   Príspevky: 159   Bydlisko: FRANCE
Príspevok Zaslal: 2004-01-09 10:17
Návrat hore  Odpovedať s citátom     

Are you sure your records have a unique key in the database ?

Dave-Just-Dave Napísal:
...

I setup a simple test database and installed phpMyEdit as per the instructions. Almost everything seems to work fine. I can add multiple records, and they show up in the main table just fine.

However, when I go to View/Change any record other than the first one, I get a blank table, with only the normal headers and footers displayed (with the save/cancel buttons, et cetera). The table HTML in the page is:

<table class="pme-main" summary="test_table">
</table>

Thoughts? I assume I'm doing something stupid, but I can't figure out what the problem is.

Thanks!
[/url]


 
Dave-Just-Dave     Založený: 08.01.2004   Príspevky: 5  
Príspevok Zaslal: 2004-01-09 14:35
Návrat hore  Odpovedať s citátom     

hbernard Napísal:
Are you sure your records have a unique key in the database ?


I think I'm sure. I created the table with:

id bigint(20) NOT NULL auto_increment,
PRIMARY KEY (id),
UNIQUE KEY id (id)

As the example in the phpMyEdit documentation at http://phpmyedit.org/configuring.php suggested.

Dave

 
hbernard     Založený: 23.03.2003   Príspevky: 159   Bydlisko: FRANCE
Príspevok Zaslal: 2004-01-09 15:53
Návrat hore  Odpovedať s citátom     

try setting

Kód:
$debug_query = true;


in pme script and see which query PME is exactly processing...

 
Dave-Just-Dave     Založený: 08.01.2004   Príspevky: 5  
Príspevok Zaslal: 2004-01-09 16:36
Návrat hore  Odpovedať s citátom     

hbernard Napísal:
try setting

Kód:
$debug_query = true;


in pme script and see which query PME is exactly processing...


I did this (thanks for the tip!), and I believe I see the problem but I'm not sure how to fix it. For some reason, the second record (which has a unique, auto-incremented ID of "1" is being selected with:

SELECT PMEtable0.id
...A Mess of Stuff Deleted...
WHERE (PMEtable0.id=2147483647);

I'm not sure where it got this massive ID number from, but that seems to be the issue. When I do the query by hand in SQL, it returns an empty set. When I change it to a valid ID (like 1), it returns the proper record.

 
Dave-Just-Dave     Založený: 08.01.2004   Príspevky: 5  
Príspevok Zaslal: 2004-01-09 17:01
Návrat hore  Odpovedať s citátom     

hbernard Napísal:
try setting

Kód:
$debug_query = true;


in pme script and see which query PME is exactly processing...


So, after more experimenting, it seems the problem is that no matter what the actual ID of the record is, the PME only sends out two queries. For the first record, it uses the ID of "1", and for all other records it's using the same ID - 2147483647.

 
hbernard     Založený: 23.03.2003   Príspevky: 159   Bydlisko: FRANCE
Príspevok Zaslal: 2004-01-09 20:25
Návrat hore  Odpovedať s citátom     

Dave-Just-Dave Napísal:
So, after more experimenting, it seems the problem is that no matter what the actual ID of the record is, the PME only sends out two queries. For the first record, it uses the ID of "1", and for all other records it's using the same ID - 2147483647.


if you use href link (using the 'G' option, for example) to make View or Edit Operation, what is the URL ?

There should be a &rec=<<ID>> in it.

BTW which version of PME are you using ?

 
Dave-Just-Dave     Založený: 08.01.2004   Príspevky: 5  
Príspevok Zaslal: 2004-01-16 16:38
Návrat hore  Odpovedať s citátom     

...

Hi again. Thanks for all your help. the ID information in the HTML on the main table page was fine, but when it hands it to the PHP script via any of the buttons, it was getting turned into a bogus value.

It appears to be a problem with BIGINT. I don't know if that's OS X specific or not, but by changing the ID field to an unsigned INT, I was able to get it to work without issue. For my database, INT is more than enough, so I'm good to go.

Again, thanks for all your help.

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov