Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP






SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Nested Repeat Region/data Display


I have the following nested repeat region:

$base_phylum = ''
$base_class = ''
$base_order = ''
$base_family = ''

mysql_query. Code:




View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Repeat Region
I am trying to convert from using Dreamweaver PHP to hand coding stuff and am having problems with this. I am trying to repeat this line of code for just the first 3 records.

<?php do { ?><p><?php echo $row_newsinfo['newstitle']; ?></p>
<p><?php echo $row_newsinfo['newsbody']; ?></p>
<p><a href="insurance-employee-benefit-news.php?newsid=<?php echo $row_newsinfo['newsid']; ?>">Read the full story >></a></p><br>
<p><img src="../images/hr_small_right.jpg" width="239" height="3"></p><br><?php } while ($row_newsinfo <= 3) ?>

View Replies !   View Related
Repeat Region & Checkboxes
Here's what I'm trying to do: I have a simple form for submitting some user choices, and the choices are presented as a recordset with each field using a checkbox to indicate the user's choice. As such, the recordset is embedded within the form. I'm labeling each individual entry of the checkbox array, and everything works fine when I submit the form information...

Except that I have multiple records and I'm displaying them using the Dreamweaver MX repeat region behavior. The records span over multiple pages, and so when i submit the entire form, only the checkbox information from the current page gets sent. What would be the recommended method for passing the checkbox information from other pages as well? Do I need to turn the navigation buttons for the repeat region into individual forms so that they maintain the POST data?

View Replies !   View Related
Dreamweaver MX Repeat Region
Im working in Dreamweaver MX with PHP and on a search retults page I keep getting the following MySQL error:

Warning: Supplied argument is not a valid MySQL result resource in /usr/home/dspurdle/public_html/admin/admin_news.php on line 33

Line 33 looks like this:

$totalRows_rsAdminNews = mysql_num_rows($all_rsAdminNews);

It only happens when I put a repeat region onthe page. Is this a Dreamweaver thing or am i missing something?

View Replies !   View Related
Sort Repeat Region
I have a table with 3 columns. Points, Matches, and Average. 'Points' and 'Matches' are getting their values from a mysql database and for the 'Average' I'm dividing 'Score' by 'Matches' using the following php code: Code:

<?php echo bcdiv($row_rstbl_players1['Points'], $row_rstbl_players1['Matches'], 2);
?>

These results are all being displayed using Dreamweaver's 'Repeat Region' function. My question is: Is there a way to have a heading above the Average column, that is actually a link, which when clicked on, will sort the results in ascending/descending order? Or, is there a way to get the database to automatically divide the 'Points' column value by the 'Matches' column value and fill the 'Average' column with the result?

View Replies !   View Related
Excluding Records From Repeat Region In PHP
PHP 4
MySQL 4.0.20
DW MW 2004 7.01

This problem is giving me a bit of a headache, and I'm getting nowhere
with it so thought I'd open it up to all, any help would be greatly
appreciated.

OVERVIEW
--------
I am creating an ecommerce site for an IT reseller. Customers must log
in to use the purchasing side of the site.

Individual customers that log in have certain products that they are
not allowed to see but this varies between users, so no two customer
may have the same hidden products.

To set this scenario up, I have a main table containing the whole range
of products the reseller sells, and a table referencing the hidden
products, consisting of a "User ID" column and a "Product ID" column.

In MySQL 4.1 I would have no problem running a subselect query and
pulling just allowed products into a recordset, unfortunately I am
running 4.0 which does not support this and I am not in a position to
upgrade the server.

I am currently getting around the problem by creating an 'Allowed
products' table rather thatn 'hidden' and listing "User ID" and
"Product ID" for all products they are allowed to view. This causes a
bit of a problem as the reseller has about 6500 purchasing customers
and 20000 products, so the 'allowed' table would grow incredibly huge,
thats 130,000,000 records if all are allowed!
----
The way I am planning to get around this problem is keep the 'Hidden'
table, create TWO recordsets on a page - one, rsFetchProducts, a
"SELECT * FROM Products" and the other, rsFetchHiddenProducts, "SELECT
Product_ID from HiddenProducts where User_ID = 'users id number'".

I then apply a repeat region to rsFetchProducts to list all data from
the recordset.

******************
What I need to do next is to filter this repeat region with PHP,
basically saying - if any of the Product_ID(s) in rsFetchProducts is
equal to any of the Product_ID(s) in rsFetchHiddenProducts, DON'T
include them in the repeat region.
******************

This must be possible, but by background on PHP isn't too great, I know
I need an if condition in the repeat region, but am not sure if I need
to filter directly from the recordset or pop it into an array first and
then filter.

View Replies !   View Related
Calculate Totals From Repeat Region
I need some help with calculating totals from a repeat region. Some times one number sometimes ten. How can this be done.

View Replies !   View Related
Display Data In Columns Of 4 And Repeat Rows
What I would really like for it to do is display the results across 4 cells and then start on the next row and so on. Code:

View Replies !   View Related
Nested Repeat
Nested repeat and horizontal loop, I think as I am stuck on a small issue with a nested repeat region which is needed and looping through it horizontally with or without tables.
Like 2 or 3 per columns but horizontally? Categoryname1

Image //for this category
Image //for this category

Categoryname2

Image //for this category
Image //for this category.

View Replies !   View Related
Nested Repeat Regions?
I'm building a review system for a list of products in a PRODUCTS table. In my ProductDetail page I'm pulling the product details filtered by their PID and beneath that I'm pulling the review details, which I need to be specific to that product.

My problem is that I've inserted two sample reviews and entered "2" as the PID in the REVIEWS table but the reviews show up on EVERY product page!? Do I need to use nested repeat regions for this which I don't know anything about but rad something about them which made me think that I did need them? PHP Code:

View Replies !   View Related
Solution To How I Coded "nested Repeat Regions" Or Heirarchical Displays
the code below assumes 3 result sets:

rsAuthors - authors table
rsBooks - book table
rsBooksSummary - summary of book table, Count(bookid) grouped by authorID

It displays something like this:

Jim Smith
One who flew over the clock tower
The hunting game

Roger Smtih
Polly wants a cracker house
Today is the day
......

Code:

View Replies !   View Related
Sort Data By Region And The Alphabetical Order
I try to sort my data by region and the alphabetical order for each page the code is okay this way PHP Code:

$query = 'SELECT * FROM artist WHERE LEFT(english_name, 1) = "'.$_GET['letter'].'" ORDER BY english_name ASC'

but when i add region = '.us.' into the query, i have problem display, and it gives me this error message Unknown column 'a' in 'where clause'

$query = "SELECT * FROM artist WHERE region = '.us.' AND LEFT(english_name, 1) = ".$_GET['letter']."";

How can i fix the problem?

View Replies !   View Related
Get Data To Repeat Itself In Pdf
I need to get some data to repeat itself underneath where it is. It's in a table. If i just repeat the code underneath the last code it will only return one lot of data. The part of code in blue needs to be repeated and output again.

Code: ....

View Replies !   View Related
Mysql Repeat Data
i have looked at database normalization but what i cant desicde where do i stop with not having repeat data and having each feild in its own table? Like say i have a feild in the users table for fsig (forum signature), not everyone is going to have one so should there be another table with fsig,psig and msig (Forum, profile and mail) and assign a userid (related to the users table) to that table or just have the 3 feilds in the user table?

View Replies !   View Related
Repeat Form Field Based On $_POST Data
i have a script that sets up a second page with multiple select boxes. the first script has a hidden field for the ID number, and a text input field for quantity. the second part of the script has a foreach loop that gets the info that goes with the ID number and then creates the select box next to it. for the most part it's all working correctly, but i don't know how to get the submitted "quantity" to repeat that ID number (and everything else). here is the initial form: Code:

View Replies !   View Related
Best Way To Loop Through Data To Make Nested Lists ?
I'm trying to turn some db data into a nested list structure to use as menus

first off, i fgured that it would be quicker to make one sql query, put the results in an array and then loop through that rather than making millions of queries - is this assumption correct ?

basically i have all my product families in a table - each family has a parent id (p_id) which is the fam_id of the family it belongs to, and its own family id (fam_id) and name (fam_nom) Code:

View Replies !   View Related
Nested MySQL Database Call Does Not Return Any Data
I am having a little problem with my PHP - MySQl code, I have two tables
(shown below) and I am trying populate a template page with data from both.
<disclaimer>Now I would like to say my skills, especially with MySQL are
rudimentary</disclaimer> However my code (link below) fails, the nested
database call does not return any data and this has me stumped. Code:

View Replies !   View Related
Possible To Pass And Display The Data Before Some Of Data In Processing?
possible to display the data before some of the data still in processing in server?

I had one page that peform the calculation with more that ten calculation of huge numeric of data and compare between each other. when the user insert all the data and pass to the server, isnt possible we display other data to the user and after the compare process had finish just display the result to the user?

possible to do that? other had other more efficient way to do that?

View Replies !   View Related
A Repeated Region Within A Repeated Region...
I am trying to list each client in my database. The loop begins with the Clients table and starts spitting out information about the client. Then the second loop begins. This loop goes through the Projects table and it is suppossed to count the number of projects that belong to each member.

Instead of looping through the Projects table each time the Client's loop loops through and gets information for the next client, the Projects table is only looped through on the first run-through of the first client. Can someone tell me how I can get the loop to start at the beginning of the Projects table each time the Clients loop starts over? Code:

View Replies !   View Related
Hide Region
I have a page that can be accessed by two differnet urls - what I would like to do is hide a link when coming from the second url

can anyone point me in the roght diection?

View Replies !   View Related
Editable Region
I am looking for a code that will allow users to customize an area within the site. I am not advanced coder, but have one working for me. The site is PHP but is auction based.

View Replies !   View Related
Protected Region Id
I'm looking informations about use PROTECTED REGION's ie: Code:

//PROTECTED REGION ID[LTY0Yy0xYy0xODYzE0MjFjLTExMDY0YzEwYzEyYzE0MWMxMWMxMzZjLTFjLTE3YzE1NTY=] START
return ($this->error!=null);
//PROTECTED REGION END

View Replies !   View Related
Resolved Region
<?php if ($row_rsContactos['web']!="" and $row_rsContactos['email']!="" and $row_rsContactos['fax']!="" and $row_rsContactos['tlm']!="" and $row_rsContactos['tel']!="" and $row_rsContactos['organizador']!="") { ?>
<table width="306" border="0">
<tr>
<td height="12">Contactos</span></td>
</tr>
</table>
<? } ?>

I just want to hide this table when the query fields (except id) return no data (null).
the result of this is that the table never appears, even when the fields return data. if I change !="" with !=="", in that case, the table appears.

View Replies !   View Related
Sorting A Repeating Region
1. There is a list of products stored in mysql each with a unique auto increment ID
2. There is a repeating region (yes created in dreamweaver) don't hate! This repeating region is a simple div that repeats with each product in it's own div.

I've got some ideas on how to sort this. Which would anyone here recommend?

1. Create a sortID that the user can modify through a form
2. Create a drag and drop using PHP and AJAX

Or is there some other standard way to custom sort these products.

View Replies !   View Related
Count The Number Of Peoples In A Region
I've ever the same problem.

Table1
idperson, name, zip

table2
zip, city, region.

Table2: same zip, many cities (1000, Lausanne - 1000, Lausanne1, ...)

Now I'd like ONE query wich return the name, zip and city, but just one
record per zip.

I mean if a record in table1 has zip 1000, I only want the first occurence
of the city (in my case Lausanne).
Actually I get as many records as they are cities with the same zip.

namex,1000,Lausanne
namex,1000,Lausanne1
namex,1000,LausanneN....

How to do so ? in fact what I need is count the number of peoples in a
region, and the region is linked to a zip.

1000, Lausanne, VD
1000, Lausanne1, VD....

the actual query is
select count(idperson), region from table1 inner join table2 on table1.zip =
table2.zip group by region.

View Replies !   View Related
PHP - Passing A Variable From A Repeated Region?
I have a repeated region with a 'Name' a 'ID' and a 'Submit' button

Repeated Region
------------------------------------------------
{Recordset1.Name}, {Recordset1.ID} |  SUBMIT |
------------------------------------------------

so on my page I see every name next to every ID in my database and each one has their own submit button.

Now what I need to do is on Submit pass the specific ID of the row in the table for which the submit button was pressed.

For example if they scroll down to the 5 element in the repeated region (with ID 5) and they hit Submit I need to pass the number 5 to a function.

I understand that you cant call a php function from a button press so I have been trying to do this with the
if(isset($_POST['submit']))
{
 // do whatever with the variable.
}

statement. Does anyone know how I can do this properly?

View Replies !   View Related
Multiple Queries - How To Loop The Region.
I have created two mysql queries. The result from one query is echoed in one column of a table and the result from the other query is echoed in the next column. These table cells repeat through a loop so that they display all records. However, because I am using TWO queries, I have no clue how to loop the region. I am using dreamweaver's standard 'repeat region' behavior, which obviously isn't going to work because my repeated region relies on two recordsets:

<?php do {?>
<tr><td><?php echo $row_rs_msg_data['topic_id'];?></td></tr>
<?php } while ($row_rs_msg_data = mysql_fetch_assoc($rs_msg_data));?>

View Replies !   View Related
Display Data
I have 2 tables named City and District in MySQL. Table City fields : CityID, CityName
Table District fields : DistrictID, DistrictName, CityID. I linked District to City. When retrieving data from District Table, how could I display CityName instead of cityID ?

View Replies !   View Related
Display Of Data
Basically I want to display the last 26 items added to the MySQL database. Sort them descending by ID. I understand how to do that fine, the situation is that I want the first one to display differently from the other 25, like a featured item.

Do I need to do two separate queries, or can it be combined. And if I do need to do 2 separate queries how do I skip the latest ID in the second query (since that would be the featured item)?

View Replies !   View Related
Display Data From Db
I'm trying to display the amount of people in my reg_mem table starting at a certain time.
I had the time stamped into the column date_added when they registered with time().
Here's what I've got: Code:

View Replies !   View Related
Cannot Display Any Data
I have created a mysql database with a table named 'testing', and fields of 'a', 'b' and 'c'. All the fields are inserted values. When I write a php file, which contains the following code:

$num=mysql_num_rows($result999);

I try and test the code with "print $num;", it returns that there are data. However, when I use the following code on the webpage, it just display nothing. What's wrong with my code? Or is it the problem of setting the character set of the webpage with the mysql db?

<?
$strsql="select * from testing where a = &#391;'";
$result=mysql_query($strsql);
print $a;
?>

View Replies !   View Related
Display Data Without While Loop
Can data in the database be displayed without using a while loop. Obviously only one record will get displayed.

mysql_select_db("db", $con);
$result = mysql_query("SELECT * FROM details");

while($row = mysql_fetch_array($result))
{ echo $row['FirstName'] . " " . $row['LastName'];
  echo "<br />";}

View Replies !   View Related
Display Data From Db Is Slow
I am trying to pull data from my database from 2 different tables and it seems to slow the page down a lot the way I did it. I was hoping someone can show me a better way to do the same thing but with faster page generation time. Code:

View Replies !   View Related
Display Data On Page
Ive got my page set up correctly as far as getting data into the database goes however I am not sure how to display it all on the page.
Basically I have a news table: news_id, club_id, title, news

I would like to display all the news items associated with the club that the user is logged into.

Id like each news item to be separated so that its easy to identify they are different news items e.g.

__________________________
$title
$news
__________________________
$title
$news
__________________________

View Replies !   View Related
Sorting Display Data
Here's the situation:

On our Golf Leaderboard, when scores are submitted, the actual numerical scores are to be sorted from lowest numeric value to the highest, while the 'over/under par' values are sorted from highest to lowest. This works just fine when only TWO scores are submitted, and displayed.

Anything over 3 player scores, it reverses the sorting of the data stated above.

Here's the PHP file: (I consider this script 'short' - I hope it falls with the parameters mentioned by the staff) Code:

View Replies !   View Related
Display Tabular Data
After conncecting to mysql database, I need to filter data by a drop-down selection,
make simple mathmatic calculations based on the selection above, display original db fields and calculation results in tabular format in an html page.

View Replies !   View Related
Table Data Display
I have a several columns on an auto generated report. On one column, the data that it displays is either "Y" or "N". Is there a way to make all the "Y"s display as an "X" and all the "N"s just display blank?

If so, how would I create something like that?

View Replies !   View Related
Display Data By Year
I need to display records from a db for this year only. This is what I've been trying: PHP Code:

$thisyear = date("Y");
SELECT * FROM table WHERE date("Y",strtotime(update)) = $thisyear

does anyone know if this is the correct way?

View Replies !   View Related
Display Mysql Data
How do I make an HTML table display data stored in a MySQL database? Also, how do I make an html form that can post new data to a MySQL database?

View Replies !   View Related
Display Data From Databas
what i need help with is displaying data from a database field. the data to be displayed is determined by the value of a variable. i am using a switch statement to define the variable $content.

the query is something like this:
SELECT * FROM table WHERE field=$content

is this right?

the table has multiple fields, ID, Title, Page and content. and i will only want to echo the Title and Content fields. what would the best way to do this be?

this thing is i will be closing the php tag after the query has been exceuted and then reopening it when i need to use the Title and content. is this possible or does php think it doesnt need it after i close the php tag?

View Replies !   View Related
Select And Display Data
When i make classes which select and display data from a database, which way is better ? i usually make a function to select data from a database and another function to display the data ? is this good practice or no? below is a clear example:

<?php
class Data
{

 funtion select()
 {
   // select data from the database
 }

 function display()
 {
  // display selected data
 }

}
?>

View Replies !   View Related
Display Data With Spaces
i am generating html tables and html form using php by using data taken from mysql db. when i try to display data (ex: bc 20) in a dynamically generated form text field (input type = text) it only displays the first part (ex: bc).

View Replies !   View Related
How To Display Data From Mysql Db
i've created a table in my sql listing the diners name and rating given :

diner name rating (star)

Diner A 4
Diner B 6
Diner C 2
Diner D 3

what I want to do is displaying it like this in the page

diner name rating (star)
Diner A ****
Diner B ******
Diner C **
Diner D ***

the astrix here could be a gif of a star , how do I do this so that php would dynamicly create the star .

View Replies !   View Related
Display XML File Data?
I have taken the below PHP parser code from a sitepoint.com article. Is this all that is needed to display XML file data? Basically I'm just trying to get a grasp of using XML.
I have created a simple XML file (menu.xml) Code:

View Replies !   View Related
How Display Data Inline
I am trying to display data inline, say in two or three columns rather than one single column. So far, I am using this code to display a single column: Code:

View Replies !   View Related
Display Data By Date
how can i get / display how old the data when it was registed in the system? i have a date_reg which is a date format Example to display

+1 months = ( 1 month + 1-15 days of current month )
-1 months =( less than 15 days upon registered )
+2 months =( 2 month + 1-15 days of current month)
-2 months =( 1 mnth + 16-29 days of previous month )

View Replies !   View Related
Display All Data From Table
I've one table that have only one field that is entry_num. So i would like to display all data from this table. my code is quite simple:

$db->query(sprintf("SELECT * FROM %s ",
"entry_num"));
$i=0;
while ($i <= $db->num_rows()){

$db->next_record();

$str .= urlencode(sprintf($db->f("entry_number")));
$i++;
}

View Replies !   View Related
Foreach To Display Data
I have a form and use foreach to output value from multiple column in database.What wrong went in the following script?I can only get the movie name but not category as well.How about if category likely to be bracketed? PHP Code:

<tr>
<td>
<?
if (isset($_SESSION['gmemberid'])) {
    $tbl_name = "movie";

    $result = mysql_query("SELECT name,category FROM $tbl_name")
                         or die("Cannot execute query.");

    $numrow = mysql_num_rows($result);

    if ($numrow != 0) {
        for ($counter = 0; $row = mysql_fetch_row($result); $counter++) {
            foreach ($row as $key => $value)....

View Replies !   View Related
Display Data From Database
how to display data from data base to website using php.i'm using dreamweaver 8 as programming tools.

View Replies !   View Related
Unique Vs. Repeat
how I can make my link script only count unique hits. Would it be easier to set up a new MySQL table? or to have a text database reset daily?

View Replies !   View Related
Why Does Each Page Repeat?
I have a site, www.ensemblemsp.com, which i inherited and now manage
has this issue that when you click a page - it does it's little flash
thing, and then starts over again.

is this PHP related?

View Replies !   View Related
Don't Show If Repeat
I am running an SQL query through a database that will probably have repeat addresses.
The purpose of this query is to download addresses for printing Labels to send out catalogs.

I need a fast way to make sure no repeat address fields are repeated. I know this is possible by running through the whole query again for each record to see if it has any matches, but that will take forever. I need a fast way to do this.

View Replies !   View Related
Keep Repeat Users Out
What would be the best way to keep users from going to a page more then once in a day?
The way I see it there are tons of ways to do it, but what is the best?
cookies? sessions? IP check?

View Replies !   View Related

Copyright © 2005-08 www.BigResource.com, All rights reserved