NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
db-form wizard query returns no results


Joined: 07 Jun 2004
Posts: 6
Reply with quote
Hi,

I created a basic form using the db-form wizard and copied file and db_myutil.inc to web server.

Running the form, I can add to database OK.

Using query ?id=62 returns a blank form.

Running query from NuSphere IDE returns data.

Any ideas?


Also, any easy way to generate a lising of records in table that will allow user to click on a listing to see details? Or does that have to be coded by hand.

Thanks!!
View user's profileFind all posts by BrentNJSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
If you need a basic table-aware editing tool, you'd take mysqladmin or pgsqladmin projects (both are written in php) and derive whatsoever you need. They both are really good projects. As with db-wizard, it's a kind of trivial tool and if you get a problem with generated scripts you always may check that with the IDE itself. Did you forget about debugger ?
If you experienced a problem with DB wizard that can be replicated, we will thank you for more detailed report.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 07 Jun 2004
Posts: 6
Reply with quote
I was looking for more of a table editing tools for users like phpMyEdit.

But anyway, in the db-form generated file we have the comments

// The default mode of this script allows a user to add a new record
// to table 'mos_users' in database 'psax'.
// To have this form function in update mode, the script needs to be
// called with a parameter for 'id' (key record field).
//
// Example: localhost:9000/myapps/myscript.php?id=3

// This would display the form with the data for record #3 appearing
// in each field.
//
// To serve the purpose of viewing a record call the form in the same
// way you would if it were to be used for 'Update mode' with the exception
// that you would probably want to remove the 'Save' button.


but if I try something similar to the example, a blank form is shown.

I tried to print the value for $id, but it was blank.

I read a post that if you had register_globals=off in the php server configuration, the value for passed variable would be blank.


But I was hoping that the wizard would take that into account.

Does that sound like what is happening?
View user's profileFind all posts by BrentNJSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
I think that localhost:9000/myapps/myscript.php?id=3 is wrong URL
It is _sample_ and you'd adjust URL accordingly, depending on where you placed the script.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 07 Jun 2004
Posts: 6
Reply with quote
Yes, I know Very Happy

Same issue, the variable for the primary key which is also id in my db, does not seem to get passed correctly. If I try to print id in the php code, nothing is returned.
View user's profileFind all posts by BrentNJSend private message


Joined: 07 Jun 2004
Posts: 6
Reply with quote
I meant echo not print
View user's profileFind all posts by BrentNJSend private message


Joined: 28 Jun 2006
Posts: 92
Reply with quote
this is perhaps a little late, and hopefull the issue's been resolved.. I had the same problem, and for me, I had register_globals = off (the secure way of doing PHP). So right after the POST statement at the top of that comment you referenced above, I put $ID = $_GET['ID']; I think there's a slightly better way with "isset()" or something, but there you go...
View user's profileFind all posts by bcswebstudioSend private message
db-form wizard query returns no results
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic