473,395 Members | 1,680 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Updating number of rows in tables

Hello,
I want to write a script that will display a table with a number of
rows the user wants. Example, I go to a page and need 30 rows, I press
submit and 30 rows are made.
I was thinking of a FOR EACH statement, but those examples are for
arrays.

Any ideas?

Scott n7seb@softhome. net
Jul 16 '05 #1
1 2027
like so? or are you even talking about SQL? If not, what's are these
rows?? They've got to come from somewhere. 30 rows of what?

$query = '<snip> LIMIT '.$POST['num_rows_requested'];
$result = mysql_query($query);
$numrows = mysql_num_rows($result); // 'num_rows_requested' ??
echo '<table>';
for ( $i=0; $i<$numrows; $i++ ) {
$row = mysql_fetch_assoc($result);
echo '<TR><TD>'.$row['column'].'</TD></TR>';
}
echo '</table>';
n7***@softhome.net (Scott Brown) wrote in message news:<16**************************@posting.google. com>...
Hello,
I want to write a script that will display a table with a number of
rows the user wants. Example, I go to a page and need 30 rows, I press
submit and 30 rows are made.
I was thinking of a FOR EACH statement, but those examples are for
arrays.

Any ideas?

Scott n7seb@softhome. net

Jul 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Srinadh | last post by:
Hi all, We have files with about 20 to 30 fields per row. We are trying to update such files with about 60 rows as contiguous data in a CLOB field. It passes through. But when we try...
1
by: Luis Esteban Valencia | last post by:
Hello Everyone, Iam an intermediate ASP.Net programmer and iam facing a challenging task. I have a table in MS-SQL server database called 'Members'. The table has following fields... ...
1
by: Robert | last post by:
I sent this last week, but am unable to go that far back in the newsgroup to read the answer, so I'm posting again: I'm using the Jet.Oledb to connect to an Access 2002 database. I have a form...
3
by: Jeremy | last post by:
The example for updating an non-strong typed dataset in the resource kit shows: dsNorthwind.Tables("ProductsDS").Rows(lstResults.SelectedIndex)("ProductName ") = ProductName & " - Updated" ...
4
by: Geoff | last post by:
Hi I'm hoping somebody can help me with the following problem that has occurred to me. Suppose I have two tables in an SQL Server database. Let's call these tables A and B. Assume that A has...
22
by: Mal Ball | last post by:
I hope I have the right forum for this question. I have an existing Windows application which uses a SQL Server database and stored procedures. I am now developing a web application to use the same...
0
by: kolalakitty | last post by:
Hopefully someone here can help me/point me in the right direction. I've found tons of references towards making relations, creating rows, saving said rows, using datagrids, databinding objects,...
33
by: bill | last post by:
In an application I am writing the user can define a series of steps to be followed. I save them in a sql database using the field "order" (a smallint) as the primary key. (there are in the range...
0
by: Dharmen Patel | last post by:
I am using Enterprise Library 2006 , Data Access Application Blocks. 1. I am connecting to Oracle 9i database using DAAB. 2. I retrieve a dataset using the following code in VB.NET. ...
1
by: jonbartlam | last post by:
Hi There I'm not sure what exactly is going wrong here. I'm writing an application that retreives a table from a database (tbl_internalfaults) and updates it. (Actually, just the status column will...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.