Question: I'm trying to add selected data row from mysql db into a html table.  

In fact i can select data and show it in console but I don't know how to add it in html page.  

**here is my js code**

```
var mysql = require('mysql');

var con = mysql.createConnection({
  host: "localhost",
  user: "root",
  password: "",
  database: "mydb"
});

con.connect(function(err) {
  if (err) throw err;
  //Select all customers and return the result object:
  con.query("SELECT * FROM customers", function (err, result, fields) {
    if (err) throw err;
    console.log(result);
  });
});

```

Answer: 
Add this Code

```
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff">

<LinearLayout
    android:id="@+id/LinearLayout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <android.support.v4.view.ViewPager
        android:id="@+id/view_pager"
        android:layout_width="match_parent"
        android:layout_height="160dp" />

    <LinearLayout
        android:id="@+id/layoutDots"
        android:layout_width="match_parent"
        android:layout_height="30dp"
        android:gravity="center"
        android:orientation="horizontal" />

    <View
        android:id="@+id/view1"
        android:layout_width="match_parent"
        android:layout_height="0.5dp"
        android:background="@android:color/darker_gray" />
</LinearLayout>

<LinearLayout
    android:id="@+id/LinearLayout1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_below="@id/listView">

    <View
        android:layout_width="0dp"
        android:layout_height="1dp"
        android:layout_gravity="center_vertical"
        android:layout_margin="10dp"
        android:layout_weight="1"
        android:background="@android:color/darker_gray" />

    <TextView
        android:id="@+id/orLoginWithEmail"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="5dp"
        android:layout_marginRight="5dp"
        android:gravity="center_vertical"
        android:text="Shop By Category"
        android:textColor="#000000"
        android:textSize="16sp" />

    <View
        android:layout_width="0dp"
        android:layout_height="1dp"
        android:layout_gravity="center_vertical"
        android:layout_margin="10dp"
        android:layout_weight="1"
        android:background="@android:color/darker_gray" />
</LinearLayout>

<android.support.v7.widget.RecyclerView
    android:id="@+id/listView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_below="@id/LinearLayout"
    android:background="@android:color/white"
    android:orientation="horizontal" />

<GridView
    android:id="@+id/gridview"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_below="@id/LinearLayout1"
    android:horizontalSpacing="10dp"
    android:numColumns="4"
    android:paddingLeft="2dp"
    android:paddingRight="2dp"
    android:paddingTop="10dp"
    android:verticalSpacing="20dp" />

```
Use only RecyclerView and use below code :

```
recyclerView .setHasFixedSize(true);
RecyclerView.LayoutManager layoutManager = new GridLayoutManager(getApplicationContext(), 8);
recyclerView .setLayoutManager(layoutManager);

```

// 8 is number of column which you want to display