Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
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




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





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