How to create JS array from 1 to n

QuestionsHow to create JS array from 1 to n
c3media asked 2 months ago

Hello Abu,

 

Finally to performance in project, there are three cols: Id – name – quantity (9 for example).

Then i would like to use select form in line grid to generate array from one to n quantity in DB table column.

As this: http://jsfiddle.net/3kcvm/

 

Thank you

3 Answers
Abu Ghufran Staff answered 2 months ago

Please share screenshot explaining your question. I don’t understand your query completely.

_________________________
Abu Ghufran - Dev Team
PHP Grid Framework
 
c3media answered 2 weeks ago

For example, this work for pure PHP, how to implement it in phpgrid:

$con = new mysqli("localhost","*****","","******");
$sql = "select * from person";
$query = $con->query($sql);
$data = array();
while($r=$query->fetch_object()){
$data[] =$r;
}

Abu Ghufran Staff answered 2 weeks ago

You can refer

Code: http://phpgrid.org/demo/demos/loading/load-array.phps

It uses php array to load datagrid.

_________________________
Abu Ghufran - Dev Team
PHP Grid Framework
 
Your Answer

10 + 17 =

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating / 5. Vote count:

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!