Kevin Yank php&mysql Novice to Ninja:Chapter 7 errors

I think there is an error in the coding for admin/jokes/index.php. The delete query in lines 235 to 247 should be removed, otherwise the joke category table can no longer provide the correct selectedCategories

I’m gonna flag this for the admins to see and pass on to the relevant team… i will say however that Kevin’s book is now 3 years old.

Also, the query in question appears to be a valid one. It’s designed as a two-step process: Remove any existing categories for the joke you just edited, and then insert the relevant new ones (even if they’re the same ones. Which… is a bit superfluous, but it works). It should be noted that the query does not delete the actual -category-, but the join-table entry for the joke-category pair.

This is probably one for @Ophelie at HQ to pass onto the relevant person(s) at HQ

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.