Jump to content

Table

New Members
  • Posts

    8
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Table's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ) Fatal error: Uncaught ArgumentCountError: mysqli_fetch_assoc() expects exactly 1 argument, 0 given in on line 22 ( ! ) ArgumentCountError: mysqli_fetch_assoc() expects exactly 1 argument, 0 given in on line 22 I get this error. ? $row = mysqli_fetch_assoc()($query_result);
  2. Thanks for your reply I tryed this it gives back this error? $query = "SELECT COUNT(row1) AS aantal FROM table WHERE row1 LIKE '" . $alfabet[$teller] . "%'"; Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'table WHERE row1 LIKE 'a%'' at line 1 on line 18 ( ! ) mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'table WHERE row1 LIKE 'a%''
  3. Why do you reply in the first case? Are you a moderator on the issue latter. What makes you react like that. Who do you think you are?
  4. Sorry I am really stuck on this otherwise I would not ask I have read the documentation sorry for my ignorance asking for help!
  5. Fatal error: Uncaught ArgumentCountError: mysqli_query() expects at least 2 arguments, 1 given in on line 19 Stuck on this error help please! <?php $servername = "localhost"; $username = "root"; $password = ""; // Create connection $conn = mysqli_connect($servername, $username, $password); $alfabet = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',); for($teller = 0; $teller < count($alfabet); $teller++){ //Nu laten we mysql tellen hoeveel namen er voorkomen in de database met de mysql-functie COUNT( $query = "SELECT COUNT(row1) AS aantal FROM table WHERE row1 LIKE '" . $alfabet[$teller] . "%'"; $query_result = mysqli_query($query); //haal de waarden op! $row = mysqli_fetch_assoc()($query_result); //nu printen we een link als de waarde groter is als 0 if($row["aantal"] > 0 ){ echo "<a href='" . $_SERVER["PHP_SELF"] . "?letter=" . $alfabet[$teller] . "'>" . $alfabet[$teller] . "</a>"; } else { //alleen de letter echo $alfabet[$teller]; } } mysqli_free_result($result); //Close the MySQL Link mysqli_close($link); ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.