[英]How to link html table to mysql table using PHP
I have a table generated by PHP/mysql, I want a user to click the column/row to view the records related to the value clicked in the column/row (2,2) . 我有一个由PHP / mysql生成的表,我希望用户单击列/行以查看与列/行(2,2)中单击的值相关的记录。 Pl find below table where I have Col Heading: AR and Row heading Opening Bal , When value 30 is clicked I need to pass row and column heading along with it so that I can search related records from the table.
请在下面的表格中找到我的列标题: AR和行标题打开Bal ,单击值30时,我需要将行标题和列标题一起传递,以便可以从表中搜索相关记录。
Columns AR, N20, N2..... are dynamically created as per product table. 根据产品表动态创建AR,N20,N2 .....列。
AR N20 N2
-------------------------------
1.Opening Bal 30 40 12
2.Received 5 2 3
3.Total 1+2 35 42 15
4.Sales 3 3 4
5.Total 3-4 32 39 11
-------------------------------
I need values to be passed to a php file where I can perform different validations and the display relevant records from more than one table. 我需要将值传递到一个php文件,在该文件中我可以执行不同的验证并显示来自多个表的相关记录。
mysql_query ("SELECT id from STOCKMASTER WHERE product='AR' AND openbal='30'");
Use Ajax crud. 使用Ajax crud。 A very useful class to dynamically generate html to perform crud operations on your DB.
一个非常有用的类,用于动态生成HTML以对您的数据库执行Crud操作。
您可以使用jqgrid- http://www.trirand.net/default.aspx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.