markrday Posted July 17, 2010 Share Posted July 17, 2010 i wonder would any of you guys know how to make a if argument work , the database has be used for stock and some stock is marked with (1) for in stock and others marked as (0) for out of stock or sold id like to add a button on the left that would only show records with the stock field (1) or stock field (0) so its easier to work out at a glance whats sold and whats not ,,i know how to edit the xml and mysql but the syntax of the if argument to show or not show only records with either (1) or (0) in is not my level of knowledge i currently got this and it shows these fields in the list view below is the code from the xml that controls the fields viewed on screen <form> <title>Products List</title> <border>true</border> <width>800</width> <fields> <_count header="No" suffix="." width="25" align="center" /> <product_vendor type="relation" align="center" header="Location"> <relation table="vendors" id="vendor_id" text="vendor_name" /> </product_vendor> <product_name align="center" header="item Name" /> <product_number align="center" header="Serial Number" /> <product_acrylic align="center" header="Colour" /> <product_cab align="center" header="Cab Colour" /> <product_count align="center" type="sql" header="Stock Level"> <sql> <vars> <table import="$this->tables[transactions]" type="eval" /> <product import="product_id" type="field" /> </vars> <query>SELECT sum(trans_inventory) FROM {TABLE} WHERE trans_product='{PRODUCT}'</query> <field>sum(trans_inventory)</field> </sql> </product_count> </fields> <header> <titles>true</titles> <buttons> </buttons> </header> <buttons> <details onclick="" button="details" > <location>index.php?sub=products&action=details§ion=1&product_id={PRODUCT_ID}&returnurl={CURRENT_PAGE}</location> </details> </buttons> <items>50</items> </form> i need an argument in the bold area to limit display to either 0 or 1 stock hope some one can help have i explained myself correctly mark Quote Link to comment https://forums.phpfreaks.com/topic/207998-xml-calling-from-mysql-problemhelp/ Share on other sites More sharing options...
fenway Posted July 21, 2010 Share Posted July 21, 2010 I have no idea what you're talking about. Quote Link to comment https://forums.phpfreaks.com/topic/207998-xml-calling-from-mysql-problemhelp/#findComment-1089306 Share on other sites More sharing options...
fenway Posted July 22, 2010 Share Posted July 22, 2010 To clarify, I don't know what's even parsing that xml, or how it's being handled. Quote Link to comment https://forums.phpfreaks.com/topic/207998-xml-calling-from-mysql-problemhelp/#findComment-1089381 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.