How do I connect to MyQL?

How do I connect to MyQL?

jimomakjimomak Posts: 22Questions: 4Answers: 0

Do I do my own PHP PDO connection string or is there a 'template', so that I pass the $conn object to DataTable libraries? If there is a template, how do I obtain it (not in initial download even with Editor selected). Then where do I put the '$connection object in the folder structure to reference it on the webpages? I use folders: 'js', 'css', 'DataTables', 'images', 'includes', etc. If I build my own $conn object then it will go into 'includes'...but does this still use the libraries of DataTables even if I reference it on all pages as <?php include("includes/dbpdo.php");?> I don't find this referenced anywhere in the documentation.

Answers

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    Assuming you are talking about DT's Editor, look at the "Installation" docs.
    https://editor.datatables.net/manual/php/getting-started#Installation

  • jimomakjimomak Posts: 22Questions: 4Answers: 0

    $(document).ready(function() { editor = new $.fn.dataTable.Editor( { ajax: "../php/staff.php",
    this implies that there is a folder called 'php' someplace. I hate to sound so dense, but what is put the 'php folder'. It seems that this is the 'webpage' for each table, but where is the documentation on this??? Is there a '.jpg' or visual of a properly formed library connected file structure someplace? And, if there is a page in the 'PHP' folder, say 'users.php', with the HTML table structure, with the Codeat the bottom, what does the '<include(".../.../somephp.php");?>look like at the top of the page that connects it to the $DB object?

  • jimomakjimomak Posts: 22Questions: 4Answers: 0

    OK..in normal PHP webpage dev, webpages are put in the 'root' of the Apache server and linked to other 'libraries' or 'connection objects' or 'css/js' folders with 'scripts' using a combination of 'include' at the top of the page, and css/js references on each webpage as appropriate. Here is my question: 1) If I have 50 tables where and how are the pages created in this 'schema' to be rendered, and utilize the DataTable libraries? I need to use server-side processing of which I read about with AJAX rendering of the <tbody></tbody> , and to perform CRUD. I'm not asking how to code anything....just how it works. If i see one example I can do it forever...but there are no real visual examples. It is too obtuse.

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    This appears to be a duplicate of your other thread. Could you keep the discussion in a single thread so I don't get confused please? :smile:

    Allan

This discussion has been closed.