hi all,

I am new in php.
I want to show every row one by one during processing with check icon in the right side from row 1 up to row n?

table
row 1 √
row 2 √
.
.
.
.
.
row n √

Recommended Answers

All 2 Replies

You can do it ...from following code please study and ask me its description if you are not getting it ...

First you have to fetch data from database in following way:

$str_product="select * from aj_subcategory as s,aj_category as c,aj_product as p where c.category_id=s.category_id and p.product_category_id=c.category_id and p.product_subcategory_id=s.subcategory_id and s.subcategory_id=".$_GET["product"]."   ";
	//echo $str_product;
	$res_product=mysql_query($str_product);
	$cnt_res=0; 
	$cnt_res= mysql_num_rows($res_product);

Then after You required to check how many rows comes if 0 then you don't need to create table for it ..

<?php

	$count=0;
	
		/*if($count<=2)
		{*/
?>
<?php
	while($row_product=mysql_fetch_array($res_product))
	{
		$count++;
	?>
<?php
			if($count==3)
			  {
					$count=0;
					echo "</tr><tr>";
			  }
		
		}
		?>

If if you want to show row 5 then please 3 with 5 , that's work ..please tell me if you still don't know how to do

If you don't mind, is the purpose of this for debugging?
If so this is not something you should even get into. It's wrong, dirty, and unprofessional. If not then just ignore this post tho reading below won't hurt ;)

You should use a debugger. I prefer the zend debugger. Not only will is show you your values anywhere in the script but it will also notify you of all warning, notices, and error PHP is kicking out, even veteran programmers can push scripts that fill error logs because they don't use debuggers. If you are new, i suggest you get started using a debugger now, it makes programming much easier.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.