How to insert a non-database field to table

How to insert a non-database field to table

tomzolltomzoll Posts: 7Questions: 0Answers: 0
edited December 2012 in General
Hello. I've got this kind of problem. I want to insert a non database field called "No" in to the first column of my table. I'm using server side script.

This is my array in server_processing.php file:
[code]
$aColumns = array(' ' , 'surname', 'name', 'email', 'registration', 'activation' );
[/code]

Retrieving data from database worked great until I added( ' ',) to $aColumns :(

This is my js:
[code]
$(document).ready(function() {
$('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "server_processing.php",
} );
} );
[/code]

This is my html:
[code]



No
surname
name
email
registration
activation



[/code]

When i remove (' ',) from $aColumns and (No) from my html file everything works great.

Can you help me?:)
Sorry for my english:)

Greetings
Tom

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Hi Tom,

    If you do a search using the search box (at the top of every page) for the title of your thread you'll find a number of matching topics, which will have relevant information.

    If they don't help you, please link use to a test page which shows us what you've currently got: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read

    Allan
This discussion has been closed.