Quantcast
Channel: Editor — DataTables forums
Viewing all articles
Browse latest Browse all 3800

set value from sql() methond

$
0
0

i have this code

 Field::inst( 'row_array' )->setValue( function () use ($db) {
          $result = $db->sql('SELECT min(usb_rw.row_array) + 1 from usb_rw ');
          $row = $result->fetch();

24        return $row [0];

        })

i want to get a number from query < SELECT min(usb_rw.row_array) + 1 from usb_rw >
but the error is << Undefined offset: 0 in C:\wamp\www\USB READ\Editor-PHP-1.4.2\php\table.mem_symbols.php on line 24
How can i fix it?

Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.


Viewing all articles
Browse latest Browse all 3800

Trending Articles