Skip to content

How can i retrieve data using sql.....? #15

Description

@Hi7cl4w

i am previously done it using data table........How can i fetch this data to streamtable? Here is my example:

<?php
$con = mysql_connect("localhost","root","aaaa");
$db = mysql_select_db("anyname",$con);

$sql = "SELECT `action_id` ,`prn`, `name`, `action` , `department` , `status`, `addedtime`  FROM `action_tbl` ; ";
$query = mysql_query($sql);
while($fetch = mysql_fetch_array($query))
{
$output[] = array ($fetch["action_id"],$fetch["prn"],$fetch["name"],$fetch["action"],$fetch["department"],$fetch["addedtime"],$fetch["status"]);
}

echo json_encode($output);
?> 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions