Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 23rd, 2005, 01:49 PM
Authorized User
 
Join Date: Jul 2004
Location: Coimbatore, Tamilnadu, India.
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to pannet1 Send a message via Yahoo to pannet1
Default php-mysql website - problem design solution

Dear,

I have purchased the above wrox book. I am using the concepts covered in the book for my website. i have the following 4 pages.

1. details.class.php
====================

// users pear DB

// count no of records on the
// foreign table named details

function countRecords($i) {
// returns no. of records
}


// returns array of records
// based on $i, which is an
// integer passed from details.php

function getDetails($i) {
}

2. master.php
=============

// $i return record no. from
// my sql database from a
// master table

// some php code here

<a link='details.php&i=' ?php print clean($i)>Details</a>

3. details.php
==============
require once (class.details.php);
require once (elements.php);

// get array of records from
// details.class.php

$aDetails = details->getDetails($i);

// get the count of record to
// know how much records will be
// returned for rendering

$iCount = details->countDetails($i)


// render page uses function from
// elements.php

$renderlist($iCount, $aDetails);

4. elements.php
===============
function renderlist($iCount, $aDetails) {
// render html code used for rendering here
}

After parsing the pages, though after the
variable $i returns the correct master record
no. on the details.php page, i dont get the
expected records from the foreign table on
the page.

also the master record which is supposed to
display a header always returns the record
no 1 irrespective of whatever record no the
variable $i have picked up.

my sql is correct as the same text return
the required record when i checked on the
phpmyadmin GUI.

can you please guide me on what is going
wrong? thanks in anticipation.


CJBGUY
__________________
CJBGUY
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
php/mysql programming problem - design - solution jben.net Beginning PHP 23 November 20th, 2003 06:34 PM
php/mysql programming problem - design - solution jben.net Beginning PHP 8 November 14th, 2003 09:00 PM
PHP MySQL Website Programming - Where is it? matius All Other Wrox Books 1 August 14th, 2003 11:13 AM
PHP MySQL Website Programming P-D-S vicsam All Other Wrox Books 1 July 27th, 2003 08:52 AM
Building a PHP Intranet Problem-Design-Solution kseba All Other Wrox Books 0 June 23rd, 2003 04:26 PM



All times are GMT -4. The time now is 05:02 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.