3

@Vitale: I feel your pain! Permission errors can be really frustrating. You are impatient to get back to work, and in your haste, you reach for chmod -R 777 *, the biggest sledgehammer in your toolkit. It probably feels like you have solved your problem, because the permission errors have gone away. Now you can get back to work! But chmod -R 777 * is never ...


2

When I am trying to figure out what SQL commands to use, I use phpmyadmin to execute the SQL commands first, for instance the Search tab for SELECT and the Insert for INSERT. Once I have the results I am looking for, I paste the SQL statement generated by phpmyadmin into the SQL tab to try it out. Only when that works do I attempt to implement the SQL ...


1

It's as simple as turning this and obviously I would prefer "Cincinnati, OH" to be the first result. into computer code :) Kinda moves into the realm of computer learning/intelligence. First you have to define "relevance" to the computer, and then tell the computer how to apply that "relevance". Here's one possible approach, assuming "relevance" is "...


1

You are missing something, but it is not obvious. There is a mysql setting called ft_min_word_len (the minimum length of words to be indexed), which defaults to 4. MySQL doc is here. See this post for details on how to change it. (Of course you would want the minimum to be 2). Also from MySQL doc: Note FULLTEXT indexes on MyISAM tables must be rebuilt ...


1

If q= "Boca Raton, Florida, 33496" as in the commented example, program will take the elif branch, and a= db.execute("SELECT * FROM places WHERE place_name LIKE :q", q=q) will indeed return an empty list. Try the query SELECT * FROM places WHERE place_name LIKE 'Boca Raton, Florida, 33496 %' in phpliteadmin or sqlite3 to see. There is no place_name that ...


1

The problem with the first sql is because of the action mentioned in this comment in CS50.php [emphasis added]: // replace placeholders with quoted, escaped strings You could add a var_dump($query) to CS50.php after line 346 and you will see the query that is being run. Then try to run that query in phpMyAdmin. It has "quoted" the parameter name, ...


1

The lines referenced by the error messages appear to be in the area of CS50.php where it is looking up the configuration file. Make sure the permissions on pset8/includes/config.php pset8/config.json are 644 (as in chmod 644 config.json).


1

"new" is a mysql stopword. Which I have interpreted to mean "noise" word, and thus ignored. It is also length 3; mysql minimum fulltext word length default is 4. If you try a MATCH against '+New' only, it will return 0 rows. Here is one way to correct for both problems: Create a file in your home directory called user_sett.cnf with contents: [mysqld] ...


Only top voted, non community-wiki answers of a minimum length are eligible