question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not working on my project :(

See original GitHub issue

I use it in my project. But it not work. `

<?php $i = 1; foreach ($listClass as $list) {

				$id_c = $list['id_class'];
				$sql_c = "SELECT COUNT(id_sub) as num FROM relation WHERE id_class = '$id_c'";
				$query_c = $db->query($sql_c);
				while ($count_c = $query_c->fetch()) {	
		?>
			<tr>
				<td scope="row"><?php echo $i; $i++; ?></td>
				<td><a href=""><?php echo $list['name_class']; ?></a></td>
				<td><?php echo $count_c['num']; ?></td>
			</tr>
		<?php 
				}
			} 
		?>
		</tbody>
	</table>

	$(document).ready(function(){
		$('#MyTable').datatable({
		    pageSize: 15,
		    sort: '*'
		}) ;

		$('#MyTable').datatable('page', 3);
		var data = $('#MyTable').datatable('select');
		$('#MyTable').datatable('delete', function (e) {
		    return e.title.trim().length > 0;
		});
	});`

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Holt59commented, May 22, 2018

How many elements do you have in the table? If you have less than 15 then you won’t notice a difference.

If this is not the case, I would need data to investigate. Could you send me the generated HTML table?

0reactions
tonyng3101commented, May 23, 2018

Thanh for your help! But I still have a question. Can it use for 2 or more table in one page?? I just add an id like $('#MyTable, #Mytable2').datatable but it look not work!

Read more comments on GitHub >

github_iconTop Results From Across the Web

5 Ways to Fix Your PC Can't Project to Another Screen?
One of the primary reasons your PC can't project to another screen is faulty or outdated drivers. This can be fixed by uninstalling...
Read more >
Microsoft Project not working
Hi, I have recently been given a license through work to try MS Project. I'm the first (and only) person in the organisation...
Read more >
Project not loading properly - Visual Studio Feedback
I have created a new project and copied my code from the old project into the new project - the files are all...
Read more >
5 reasons your project management process isn't working
This post identifies the top 5 problems that arise with broken project management processes, and offers practical solutions and approaches ...
Read more >
I am working on a project in a group and some on my member ...
I am working on a project in a group and some on my member do not work at all. How should I deal...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found
STT Tên lớp học Số môn đang học