How can I print?

The following actually worked.

 

<html>
<head><title>Kaz's program</title></head>
<body>

Let's see.
<?php

include "ここにパスワードなどの情報があるファイルを";
$con=mysqli_connect($host,$user,$passwd,$dbname) or die ("Didn't connect, Man.");
$query="SELECT * FROM `vocab_list` where ID < 10";
$result=mysqli_query($con,$query)
or die ("Didnt work.");
$row=mysqli_fetch_assoc($result);

ここで、書きだしたいものの、以下のではだめのようです。
echo $row['word'];

?>

Does this print?
</body></html>

MySQL error

I kept getting an error message from this:

$query = "SELECT * FROM 'questions' WHERE question_number= $number";

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''questions' WHERE question_number= 1' at line 116

I removed 's from the statement and it started working without an error message.

$query = "SELECT * FROM questions WHERE question_number= $number";

MySQL database character set and collation

The default character set is latin1_swedish_ci .  I will use utf8_general_ci instead since it seems to be the most up-to-date character set and the article I found (see reference) suggests we do.  However, I have never encountered an issue just using latin1_swedish_ci for Japanese materials.  My questions are:

  1. Can I change it back to other options later?
  2. What does "ci" mean?
  3. There are many types of utf8 in the option.  Is utf8_general_ci really the good option?

Reference:

https://mediatemple.net/community/products/dv/204403914/default-mysql-character-set-and-collation

 

MySQL commands

Drop tables.

DROP TABLE `wp_commentmeta`, `wp_comments`, `wp_links`, `wp_options`, `wp_postmeta`, `wp_posts`, `wp_terms`, `wp_term_relationships`, `wp_term_taxonomy`, `wp_usermeta`, `wp_users`;

 

 

Not seeing a MySQL table I just created

I created a new blank MySQL database.  I couldn't see it when accessing it via. phpMyAdmin.   I only saw two old MySQL databases.

It turns out that the new one was associated with a different user name.   I had to log out of the screen first by clicking on one of the icons on the left-upper side of the phpMyAdmin window.   After the log-out, I logged in with the right user name and the password, when I was able to see all MySQL databases I needed to see.

Each phpMyAdmin session is specific to each of the users I created.