CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 how to repeat a record based on a value

Print topic Send  topic

Author Message
pathans

Posts: 46
Posted: 02/08/2013, 3:28 PM

I have a page which shows all the servers in a rack. as you know some server are more then 1U.
so what i am trying to do is show the same page with all the servers and if a server is more then one 1U that record repeats in next row.

so lets say if a asset have model_unit value 4 then it repeats 4 times. before moving to next record.

here is my query please let me know if anyone can help i can share the code.
=====
SELECT assets_name, assets_serial, assets_ra, vendor_name, assets_unit, rack_name, assets_id, model_name ,assets_models.model_unit
FROM ((assets INNER JOIN vendors ON
vendors.vendor_id = assets.assets_vendor) INNER JOIN rack ON
rack.rack_id = assets.assets_rack) INNER JOIN assets_models ON
assets_models.model_id = assets.assets_model
WHERE rack_id = {rack_id}
ORDER BY ABS(assets_unit)
====


View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.