Guys pls help me i am not able to find the solution i tried to retrieve from mysql datbase but when i complie html code i am not able to see the data in the datbase so pls help me to solve
Darya my friend pls help me this is the code
This is a.html file
Arab3mygrid = new dhtmlXGridObject('gridbox');
mygrid.setImagePath('../dhtmlxGrid/codebase/imgs/');
mygrid.setHeader("Column A, Column B, Col C, Colum D");
//mygrid.attachHeader("#connector_text_filter,#connector_select_filter")
mygrid.setInitWidths("100,*")
mygrid.setColTypes("ed,ed");
mygrid.setSkin("dhx_skyblue");
mygrid.setColSorting("connector,connector")
mygrid.enableSmartRendering(true)
mygrid.enableMultiselect(true)
mygrid.init();
mygrid.loadXML("arab.php");
//grid.render_table("","id","name,price","color,count");
//var dp = new dataProcessor("b.jsp");
//dp.init(mygrid);
</script>
This is b.jsp:
<%@ page contentType=“text/html” language=“java” import=“java.sql."%>
<%@ page contentType=“text/html” language=“java” import=“java.sql.Connection”%>
<%@ page contentType=“text/html” language=“java” import=“java.sql.DriverManager”%>
<%@ page contentType=“text/html” language=“java” import="com.dhtmlx.connector.”%>
public class BasicConnector extends ConnectorServlet
{
@Override
protected void configure() {
//obtain DB connection
Connection conn=null;
try
{
Class.forName (“com.mysql.jdbc.Driver”).newInstance ();
conn = DriverManager.getConnection(“jdbc:mysql://localhost:3306/jill”, “root”, “”);
}
catch (Throwable e)
{
e.printStackTrace();
}
GridConnector c = new GridConnector(conn);
//closed
c.render_table(“salestype”);
//closed
}
This is table in mysql in xampp software:
ColA ColB Col C Col D
1 A B C
2 F G H
3 Q W E