enter image description hereI am supposed to run some SQL code from the distribution code. I am supposed to get success when I click go, but I get this error:

Link: enter image description here https://ide50-khalidmukadam.cs50.io/phpmyadmin/server_sql.php?db=&table=&server=1&target=&token=5fd5d6129a35646f79f8407dd4215340#PMAURL-0:server_sql.php?db=&table=&server=1&target=&token=5fd5d6129a35646f79f8407dd4215340


Within CS50 IDE, now, open up pset8.sql, which you downloaded earlier. You should see a whole bunch of SQL statements. Highlight them all, select Edit > Copy (or hit control-c), then return to phpMyAdmin. Click phpMyAdmin’s SQL tab, and paste everything you copied into that page’s big text box (which is below Run SQL query/queries on server ""). Skim what you just pasted to get a sense of the commands you’re about to execute, then click Go. You should then see a greenish banner indicating success (i.e., 1 row affected). In phpMyAdmin’s top-left corner, you should now see link to a database called pset8, beneath which is a link to a table called places. (If you don’t, try reloading the page.) If you click places, you’ll find (gasp!) that this table is empty. But we have defined its "schema" (i.e., structure) for you. Click phpMyAdmin’s Structure tab to see.

  • Your link will not work for others (because your workspace is private). You may want to change that to a screenshot. Dec 23 '16 at 16:16
  • That is the code I copied and pasted. Dec 23 '16 at 16:30

You are missing some (VERY important) lines from the supplied sql. The first 12 lines is where it creates the database and the table. They are missing from the sql that you are running. Looks like the last two lines are missing too. That is not the full sql found at the link supplied in the specification.

Suffice it to say, you need to run the whole sql supplied in the pset link. For pset 8, it is 27 lines.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .