PHP PDO Class with multiple Select Efficiency and speed [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
1
down vote

favorite












I am very new to classes, and not sure how efficient this class is, would appreciate improvement feedback and info on efficiency including speed.



The class includes a construct that creates a connection to the database and two other functions that get data from the database and return some values concated with some HTML.



This is made from code that I've found around the web mostly SO, so would be good if suggestions were easy to understand for a novice.



Can improvements be made to this so that it is efficient and best practices are incorporated?



<?php
class MyClass
protected $PDO;

public function __construct(PDO $PDO)
$this->PDO = $PDO;


public function getCount($sq,$bkid,$bkname)
$sth = $this->PDO->prepare("SELECT COUNT(sentence) AS b FROM sentence, chapters, books WHERE MATCH(sentence) AGAINST (:q IN BOOLEAN MODE) AND chapters.book_Id = books.book_Id AND sentence.chapter_Id = chapters.chapter_Id AND books.book_Id = :bk");
$sth->execute(array(':q' => $sq, ':bk' => $bkid));
$row = $sth->fetch(PDO::FETCH_ASSOC);
$total = $row['b'];
if($total!=0)

$ensq = urlencode($sq);
$count = "<a href='filter.php?id=$bkid&amp;q=$ensq'>$bkname</a><sup>$total</sup> ";
return $count;

else

return;



public function getwriter($sqn)
$nsth = $this->PDO->prepare("SELECT COUNT(DISTINCT(writer)) AS n FROM sentence WHERE MATCH(writer) AGAINST (:q IN BOOLEAN MODE)");
$nsth->execute(array(':q' => $sqn));
$nrow = $nsth->fetch(PDO::FETCH_ASSOC);
$ntotal = $nrow['n'];
if($ntotal!=0)

$nensq = urlencode($sqn);
$ncount = "<a href='nsearch.php?q=$nensq'>writers</a><sup>$ntotal</sup> ";
return $ncount;

else

return;



public function getChapter($cqn)
$csth = $this->PDO->prepare("SELECT COUNT(chapter_Title) AS c FROM chapters WHERE MATCH (chapter_Title) AGAINST (:q IN BOOLEAN MODE)");
$csth->execute(array(':q' => $cqn));
$crow = $csth->fetch(PDO::FETCH_ASSOC);
$ctotal = $crow['c'];
if($ctotal!=0)

$censq = urlencode($cqn);
$ccount = "<a href='csearch.php?q=$censq'>Chapters</a><sup>$ctotal</sup> ";
return $ccount;

else

return;



$dbh = new PDO('mysql:host=localhost;dbname=dbname;charset=utf8', 'db', 'pass');
?>


And also is it ok to call the function multiple times next to each other like so:



$t = new MyClass($dbh);
echo $t->getCount($search,11,"Book 1");
echo $t->getCount($search,4,"Book 2");
echo $t->getCount($search,39,"Book 3");
echo $t->getCount($search,56,"Book 4");
echo $t->getWriter($search);
echo $t->getChapter($search);
$dbh = null;






share|improve this question













closed as unclear what you're asking by Graipher, Sam Onela, t3chb0t, Donald.McLean, Mast Jan 29 at 17:21


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.




















    up vote
    1
    down vote

    favorite












    I am very new to classes, and not sure how efficient this class is, would appreciate improvement feedback and info on efficiency including speed.



    The class includes a construct that creates a connection to the database and two other functions that get data from the database and return some values concated with some HTML.



    This is made from code that I've found around the web mostly SO, so would be good if suggestions were easy to understand for a novice.



    Can improvements be made to this so that it is efficient and best practices are incorporated?



    <?php
    class MyClass
    protected $PDO;

    public function __construct(PDO $PDO)
    $this->PDO = $PDO;


    public function getCount($sq,$bkid,$bkname)
    $sth = $this->PDO->prepare("SELECT COUNT(sentence) AS b FROM sentence, chapters, books WHERE MATCH(sentence) AGAINST (:q IN BOOLEAN MODE) AND chapters.book_Id = books.book_Id AND sentence.chapter_Id = chapters.chapter_Id AND books.book_Id = :bk");
    $sth->execute(array(':q' => $sq, ':bk' => $bkid));
    $row = $sth->fetch(PDO::FETCH_ASSOC);
    $total = $row['b'];
    if($total!=0)

    $ensq = urlencode($sq);
    $count = "<a href='filter.php?id=$bkid&amp;q=$ensq'>$bkname</a><sup>$total</sup> ";
    return $count;

    else

    return;



    public function getwriter($sqn)
    $nsth = $this->PDO->prepare("SELECT COUNT(DISTINCT(writer)) AS n FROM sentence WHERE MATCH(writer) AGAINST (:q IN BOOLEAN MODE)");
    $nsth->execute(array(':q' => $sqn));
    $nrow = $nsth->fetch(PDO::FETCH_ASSOC);
    $ntotal = $nrow['n'];
    if($ntotal!=0)

    $nensq = urlencode($sqn);
    $ncount = "<a href='nsearch.php?q=$nensq'>writers</a><sup>$ntotal</sup> ";
    return $ncount;

    else

    return;



    public function getChapter($cqn)
    $csth = $this->PDO->prepare("SELECT COUNT(chapter_Title) AS c FROM chapters WHERE MATCH (chapter_Title) AGAINST (:q IN BOOLEAN MODE)");
    $csth->execute(array(':q' => $cqn));
    $crow = $csth->fetch(PDO::FETCH_ASSOC);
    $ctotal = $crow['c'];
    if($ctotal!=0)

    $censq = urlencode($cqn);
    $ccount = "<a href='csearch.php?q=$censq'>Chapters</a><sup>$ctotal</sup> ";
    return $ccount;

    else

    return;



    $dbh = new PDO('mysql:host=localhost;dbname=dbname;charset=utf8', 'db', 'pass');
    ?>


    And also is it ok to call the function multiple times next to each other like so:



    $t = new MyClass($dbh);
    echo $t->getCount($search,11,"Book 1");
    echo $t->getCount($search,4,"Book 2");
    echo $t->getCount($search,39,"Book 3");
    echo $t->getCount($search,56,"Book 4");
    echo $t->getWriter($search);
    echo $t->getChapter($search);
    $dbh = null;






    share|improve this question













    closed as unclear what you're asking by Graipher, Sam Onela, t3chb0t, Donald.McLean, Mast Jan 29 at 17:21


    Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I am very new to classes, and not sure how efficient this class is, would appreciate improvement feedback and info on efficiency including speed.



      The class includes a construct that creates a connection to the database and two other functions that get data from the database and return some values concated with some HTML.



      This is made from code that I've found around the web mostly SO, so would be good if suggestions were easy to understand for a novice.



      Can improvements be made to this so that it is efficient and best practices are incorporated?



      <?php
      class MyClass
      protected $PDO;

      public function __construct(PDO $PDO)
      $this->PDO = $PDO;


      public function getCount($sq,$bkid,$bkname)
      $sth = $this->PDO->prepare("SELECT COUNT(sentence) AS b FROM sentence, chapters, books WHERE MATCH(sentence) AGAINST (:q IN BOOLEAN MODE) AND chapters.book_Id = books.book_Id AND sentence.chapter_Id = chapters.chapter_Id AND books.book_Id = :bk");
      $sth->execute(array(':q' => $sq, ':bk' => $bkid));
      $row = $sth->fetch(PDO::FETCH_ASSOC);
      $total = $row['b'];
      if($total!=0)

      $ensq = urlencode($sq);
      $count = "<a href='filter.php?id=$bkid&amp;q=$ensq'>$bkname</a><sup>$total</sup> ";
      return $count;

      else

      return;



      public function getwriter($sqn)
      $nsth = $this->PDO->prepare("SELECT COUNT(DISTINCT(writer)) AS n FROM sentence WHERE MATCH(writer) AGAINST (:q IN BOOLEAN MODE)");
      $nsth->execute(array(':q' => $sqn));
      $nrow = $nsth->fetch(PDO::FETCH_ASSOC);
      $ntotal = $nrow['n'];
      if($ntotal!=0)

      $nensq = urlencode($sqn);
      $ncount = "<a href='nsearch.php?q=$nensq'>writers</a><sup>$ntotal</sup> ";
      return $ncount;

      else

      return;



      public function getChapter($cqn)
      $csth = $this->PDO->prepare("SELECT COUNT(chapter_Title) AS c FROM chapters WHERE MATCH (chapter_Title) AGAINST (:q IN BOOLEAN MODE)");
      $csth->execute(array(':q' => $cqn));
      $crow = $csth->fetch(PDO::FETCH_ASSOC);
      $ctotal = $crow['c'];
      if($ctotal!=0)

      $censq = urlencode($cqn);
      $ccount = "<a href='csearch.php?q=$censq'>Chapters</a><sup>$ctotal</sup> ";
      return $ccount;

      else

      return;



      $dbh = new PDO('mysql:host=localhost;dbname=dbname;charset=utf8', 'db', 'pass');
      ?>


      And also is it ok to call the function multiple times next to each other like so:



      $t = new MyClass($dbh);
      echo $t->getCount($search,11,"Book 1");
      echo $t->getCount($search,4,"Book 2");
      echo $t->getCount($search,39,"Book 3");
      echo $t->getCount($search,56,"Book 4");
      echo $t->getWriter($search);
      echo $t->getChapter($search);
      $dbh = null;






      share|improve this question













      I am very new to classes, and not sure how efficient this class is, would appreciate improvement feedback and info on efficiency including speed.



      The class includes a construct that creates a connection to the database and two other functions that get data from the database and return some values concated with some HTML.



      This is made from code that I've found around the web mostly SO, so would be good if suggestions were easy to understand for a novice.



      Can improvements be made to this so that it is efficient and best practices are incorporated?



      <?php
      class MyClass
      protected $PDO;

      public function __construct(PDO $PDO)
      $this->PDO = $PDO;


      public function getCount($sq,$bkid,$bkname)
      $sth = $this->PDO->prepare("SELECT COUNT(sentence) AS b FROM sentence, chapters, books WHERE MATCH(sentence) AGAINST (:q IN BOOLEAN MODE) AND chapters.book_Id = books.book_Id AND sentence.chapter_Id = chapters.chapter_Id AND books.book_Id = :bk");
      $sth->execute(array(':q' => $sq, ':bk' => $bkid));
      $row = $sth->fetch(PDO::FETCH_ASSOC);
      $total = $row['b'];
      if($total!=0)

      $ensq = urlencode($sq);
      $count = "<a href='filter.php?id=$bkid&amp;q=$ensq'>$bkname</a><sup>$total</sup> ";
      return $count;

      else

      return;



      public function getwriter($sqn)
      $nsth = $this->PDO->prepare("SELECT COUNT(DISTINCT(writer)) AS n FROM sentence WHERE MATCH(writer) AGAINST (:q IN BOOLEAN MODE)");
      $nsth->execute(array(':q' => $sqn));
      $nrow = $nsth->fetch(PDO::FETCH_ASSOC);
      $ntotal = $nrow['n'];
      if($ntotal!=0)

      $nensq = urlencode($sqn);
      $ncount = "<a href='nsearch.php?q=$nensq'>writers</a><sup>$ntotal</sup> ";
      return $ncount;

      else

      return;



      public function getChapter($cqn)
      $csth = $this->PDO->prepare("SELECT COUNT(chapter_Title) AS c FROM chapters WHERE MATCH (chapter_Title) AGAINST (:q IN BOOLEAN MODE)");
      $csth->execute(array(':q' => $cqn));
      $crow = $csth->fetch(PDO::FETCH_ASSOC);
      $ctotal = $crow['c'];
      if($ctotal!=0)

      $censq = urlencode($cqn);
      $ccount = "<a href='csearch.php?q=$censq'>Chapters</a><sup>$ctotal</sup> ";
      return $ccount;

      else

      return;



      $dbh = new PDO('mysql:host=localhost;dbname=dbname;charset=utf8', 'db', 'pass');
      ?>


      And also is it ok to call the function multiple times next to each other like so:



      $t = new MyClass($dbh);
      echo $t->getCount($search,11,"Book 1");
      echo $t->getCount($search,4,"Book 2");
      echo $t->getCount($search,39,"Book 3");
      echo $t->getCount($search,56,"Book 4");
      echo $t->getWriter($search);
      echo $t->getChapter($search);
      $dbh = null;








      share|improve this question












      share|improve this question




      share|improve this question








      edited Jan 29 at 18:29
























      asked Jan 27 at 22:30









      Abu Nooh

      1064




      1064




      closed as unclear what you're asking by Graipher, Sam Onela, t3chb0t, Donald.McLean, Mast Jan 29 at 17:21


      Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






      closed as unclear what you're asking by Graipher, Sam Onela, t3chb0t, Donald.McLean, Mast Jan 29 at 17:21


      Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote













          The most important thing you have to learn about classes: every method should be responsible for one task only. Means a method that gets you a count should return you a count, not some HTML.



          Two other minor improvements would be a better SQL formatting, so anyone could actually read it and a nice helper function that exists in PDO, fetchColumn():



          So your methods should be like



          public function getCount($sq,$bkid) 
          $sql = "SELECT COUNT(sentence)
          FROM sentence, chapters, books
          WHERE MATCH(sentence) AGAINST (:q IN BOOLEAN MODE)
          AND chapters.book_Id = books.book_Id
          AND sentence.chapter_Id = chapters.chapter_Id
          AND books.book_Id = :bk"
          $sth = $this->PDO->prepare($sql);
          $sth->execute(array(':q' => $sq, ':bk' => $bkid));
          return $sth->fetchColumn();



          Whereas for the HTML formatting there should be another method/function. Let me suggest to you something like this:



          function getLink($title, $count, $parameters)

          if ($count)

          $qs = http_build_query($parameters);
          $title = htmlspecialchars($title);
          return "<a href='filter.php?$qs'>$title</a><sup>$total</sup>n";




          it could be used like this:



          $count = $t->getCount($search, 11);
          echo getLink("Book 1", $count, ['id' => 11, 'q'=> $search]);


          Here, as you can see, a handy http_build_query() would take care of encoding your keys and values.






          share|improve this answer























          • Thank you for the help, could the getLink function be set up so that it can be used for all the other functions that get counts? So that i don't have to create a getLink function for each getCount function?
            – Abu Nooh
            Jan 29 at 18:31










          • it is already created this way you can use it with any other link
            – Your Common Sense
            Jan 29 at 18:50










          • What I meant was the getChapter() function doesn't take 3 parameters, just the 1, so could you give me an example of how I can use getLink() with getChapter()? Thank you +1
            – Abu Nooh
            Jan 29 at 19:02










          • I am sure you can make it yourself. Just read the function's code. It's pretty straightforward.
            – Your Common Sense
            Jan 29 at 19:05










          • Ah yes that's what I meant, so I'll just have to replicate it and won't be able to use the same one, and thank you for the great tips.
            – Abu Nooh
            Jan 29 at 19:49

















          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote













          The most important thing you have to learn about classes: every method should be responsible for one task only. Means a method that gets you a count should return you a count, not some HTML.



          Two other minor improvements would be a better SQL formatting, so anyone could actually read it and a nice helper function that exists in PDO, fetchColumn():



          So your methods should be like



          public function getCount($sq,$bkid) 
          $sql = "SELECT COUNT(sentence)
          FROM sentence, chapters, books
          WHERE MATCH(sentence) AGAINST (:q IN BOOLEAN MODE)
          AND chapters.book_Id = books.book_Id
          AND sentence.chapter_Id = chapters.chapter_Id
          AND books.book_Id = :bk"
          $sth = $this->PDO->prepare($sql);
          $sth->execute(array(':q' => $sq, ':bk' => $bkid));
          return $sth->fetchColumn();



          Whereas for the HTML formatting there should be another method/function. Let me suggest to you something like this:



          function getLink($title, $count, $parameters)

          if ($count)

          $qs = http_build_query($parameters);
          $title = htmlspecialchars($title);
          return "<a href='filter.php?$qs'>$title</a><sup>$total</sup>n";




          it could be used like this:



          $count = $t->getCount($search, 11);
          echo getLink("Book 1", $count, ['id' => 11, 'q'=> $search]);


          Here, as you can see, a handy http_build_query() would take care of encoding your keys and values.






          share|improve this answer























          • Thank you for the help, could the getLink function be set up so that it can be used for all the other functions that get counts? So that i don't have to create a getLink function for each getCount function?
            – Abu Nooh
            Jan 29 at 18:31










          • it is already created this way you can use it with any other link
            – Your Common Sense
            Jan 29 at 18:50










          • What I meant was the getChapter() function doesn't take 3 parameters, just the 1, so could you give me an example of how I can use getLink() with getChapter()? Thank you +1
            – Abu Nooh
            Jan 29 at 19:02










          • I am sure you can make it yourself. Just read the function's code. It's pretty straightforward.
            – Your Common Sense
            Jan 29 at 19:05










          • Ah yes that's what I meant, so I'll just have to replicate it and won't be able to use the same one, and thank you for the great tips.
            – Abu Nooh
            Jan 29 at 19:49














          up vote
          2
          down vote













          The most important thing you have to learn about classes: every method should be responsible for one task only. Means a method that gets you a count should return you a count, not some HTML.



          Two other minor improvements would be a better SQL formatting, so anyone could actually read it and a nice helper function that exists in PDO, fetchColumn():



          So your methods should be like



          public function getCount($sq,$bkid) 
          $sql = "SELECT COUNT(sentence)
          FROM sentence, chapters, books
          WHERE MATCH(sentence) AGAINST (:q IN BOOLEAN MODE)
          AND chapters.book_Id = books.book_Id
          AND sentence.chapter_Id = chapters.chapter_Id
          AND books.book_Id = :bk"
          $sth = $this->PDO->prepare($sql);
          $sth->execute(array(':q' => $sq, ':bk' => $bkid));
          return $sth->fetchColumn();



          Whereas for the HTML formatting there should be another method/function. Let me suggest to you something like this:



          function getLink($title, $count, $parameters)

          if ($count)

          $qs = http_build_query($parameters);
          $title = htmlspecialchars($title);
          return "<a href='filter.php?$qs'>$title</a><sup>$total</sup>n";




          it could be used like this:



          $count = $t->getCount($search, 11);
          echo getLink("Book 1", $count, ['id' => 11, 'q'=> $search]);


          Here, as you can see, a handy http_build_query() would take care of encoding your keys and values.






          share|improve this answer























          • Thank you for the help, could the getLink function be set up so that it can be used for all the other functions that get counts? So that i don't have to create a getLink function for each getCount function?
            – Abu Nooh
            Jan 29 at 18:31










          • it is already created this way you can use it with any other link
            – Your Common Sense
            Jan 29 at 18:50










          • What I meant was the getChapter() function doesn't take 3 parameters, just the 1, so could you give me an example of how I can use getLink() with getChapter()? Thank you +1
            – Abu Nooh
            Jan 29 at 19:02










          • I am sure you can make it yourself. Just read the function's code. It's pretty straightforward.
            – Your Common Sense
            Jan 29 at 19:05










          • Ah yes that's what I meant, so I'll just have to replicate it and won't be able to use the same one, and thank you for the great tips.
            – Abu Nooh
            Jan 29 at 19:49












          up vote
          2
          down vote










          up vote
          2
          down vote









          The most important thing you have to learn about classes: every method should be responsible for one task only. Means a method that gets you a count should return you a count, not some HTML.



          Two other minor improvements would be a better SQL formatting, so anyone could actually read it and a nice helper function that exists in PDO, fetchColumn():



          So your methods should be like



          public function getCount($sq,$bkid) 
          $sql = "SELECT COUNT(sentence)
          FROM sentence, chapters, books
          WHERE MATCH(sentence) AGAINST (:q IN BOOLEAN MODE)
          AND chapters.book_Id = books.book_Id
          AND sentence.chapter_Id = chapters.chapter_Id
          AND books.book_Id = :bk"
          $sth = $this->PDO->prepare($sql);
          $sth->execute(array(':q' => $sq, ':bk' => $bkid));
          return $sth->fetchColumn();



          Whereas for the HTML formatting there should be another method/function. Let me suggest to you something like this:



          function getLink($title, $count, $parameters)

          if ($count)

          $qs = http_build_query($parameters);
          $title = htmlspecialchars($title);
          return "<a href='filter.php?$qs'>$title</a><sup>$total</sup>n";




          it could be used like this:



          $count = $t->getCount($search, 11);
          echo getLink("Book 1", $count, ['id' => 11, 'q'=> $search]);


          Here, as you can see, a handy http_build_query() would take care of encoding your keys and values.






          share|improve this answer















          The most important thing you have to learn about classes: every method should be responsible for one task only. Means a method that gets you a count should return you a count, not some HTML.



          Two other minor improvements would be a better SQL formatting, so anyone could actually read it and a nice helper function that exists in PDO, fetchColumn():



          So your methods should be like



          public function getCount($sq,$bkid) 
          $sql = "SELECT COUNT(sentence)
          FROM sentence, chapters, books
          WHERE MATCH(sentence) AGAINST (:q IN BOOLEAN MODE)
          AND chapters.book_Id = books.book_Id
          AND sentence.chapter_Id = chapters.chapter_Id
          AND books.book_Id = :bk"
          $sth = $this->PDO->prepare($sql);
          $sth->execute(array(':q' => $sq, ':bk' => $bkid));
          return $sth->fetchColumn();



          Whereas for the HTML formatting there should be another method/function. Let me suggest to you something like this:



          function getLink($title, $count, $parameters)

          if ($count)

          $qs = http_build_query($parameters);
          $title = htmlspecialchars($title);
          return "<a href='filter.php?$qs'>$title</a><sup>$total</sup>n";




          it could be used like this:



          $count = $t->getCount($search, 11);
          echo getLink("Book 1", $count, ['id' => 11, 'q'=> $search]);


          Here, as you can see, a handy http_build_query() would take care of encoding your keys and values.







          share|improve this answer















          share|improve this answer



          share|improve this answer








          edited Jan 29 at 20:09









          Sam Onela

          5,88461545




          5,88461545











          answered Jan 28 at 13:18









          Your Common Sense

          2,435524




          2,435524











          • Thank you for the help, could the getLink function be set up so that it can be used for all the other functions that get counts? So that i don't have to create a getLink function for each getCount function?
            – Abu Nooh
            Jan 29 at 18:31










          • it is already created this way you can use it with any other link
            – Your Common Sense
            Jan 29 at 18:50










          • What I meant was the getChapter() function doesn't take 3 parameters, just the 1, so could you give me an example of how I can use getLink() with getChapter()? Thank you +1
            – Abu Nooh
            Jan 29 at 19:02










          • I am sure you can make it yourself. Just read the function's code. It's pretty straightforward.
            – Your Common Sense
            Jan 29 at 19:05










          • Ah yes that's what I meant, so I'll just have to replicate it and won't be able to use the same one, and thank you for the great tips.
            – Abu Nooh
            Jan 29 at 19:49
















          • Thank you for the help, could the getLink function be set up so that it can be used for all the other functions that get counts? So that i don't have to create a getLink function for each getCount function?
            – Abu Nooh
            Jan 29 at 18:31










          • it is already created this way you can use it with any other link
            – Your Common Sense
            Jan 29 at 18:50










          • What I meant was the getChapter() function doesn't take 3 parameters, just the 1, so could you give me an example of how I can use getLink() with getChapter()? Thank you +1
            – Abu Nooh
            Jan 29 at 19:02










          • I am sure you can make it yourself. Just read the function's code. It's pretty straightforward.
            – Your Common Sense
            Jan 29 at 19:05










          • Ah yes that's what I meant, so I'll just have to replicate it and won't be able to use the same one, and thank you for the great tips.
            – Abu Nooh
            Jan 29 at 19:49















          Thank you for the help, could the getLink function be set up so that it can be used for all the other functions that get counts? So that i don't have to create a getLink function for each getCount function?
          – Abu Nooh
          Jan 29 at 18:31




          Thank you for the help, could the getLink function be set up so that it can be used for all the other functions that get counts? So that i don't have to create a getLink function for each getCount function?
          – Abu Nooh
          Jan 29 at 18:31












          it is already created this way you can use it with any other link
          – Your Common Sense
          Jan 29 at 18:50




          it is already created this way you can use it with any other link
          – Your Common Sense
          Jan 29 at 18:50












          What I meant was the getChapter() function doesn't take 3 parameters, just the 1, so could you give me an example of how I can use getLink() with getChapter()? Thank you +1
          – Abu Nooh
          Jan 29 at 19:02




          What I meant was the getChapter() function doesn't take 3 parameters, just the 1, so could you give me an example of how I can use getLink() with getChapter()? Thank you +1
          – Abu Nooh
          Jan 29 at 19:02












          I am sure you can make it yourself. Just read the function's code. It's pretty straightforward.
          – Your Common Sense
          Jan 29 at 19:05




          I am sure you can make it yourself. Just read the function's code. It's pretty straightforward.
          – Your Common Sense
          Jan 29 at 19:05












          Ah yes that's what I meant, so I'll just have to replicate it and won't be able to use the same one, and thank you for the great tips.
          – Abu Nooh
          Jan 29 at 19:49




          Ah yes that's what I meant, so I'll just have to replicate it and won't be able to use the same one, and thank you for the great tips.
          – Abu Nooh
          Jan 29 at 19:49


          Popular posts from this blog

          Chat program with C++ and SFML

          Function to Return a JSON Like Objects Using VBA Collections and Arrays

          Will my employers contract hold up in court?