Posts by Paulo Henrique Lima • 21 points
4 posts
-
0
votes2
answers208
viewsA: Quote problem in query syntax in Mysql
I believe that the best way to solve this is by setting the quotes of the variable only if it is not empty. Also, the null has to be string for the term "null" to appear in your SQL code. public…
-
0
votes2
answers164
viewsA: Show Json + Mysql + PHP Value
The last item in the array cannot contain comma. I believe this is the error. Try to remove the comma at the end of 'img' => 'img300x300.png' and tell us what happens.
-
0
votes1
answer80
viewsA: Search the Database (Mysql) and create Sitemap in parts (PHP)
I believe so. You can create a file called sitemap.php that gets a $_GET and work inside that file. Then simply enter a code similar to: RewriteRule ^sitemap([0-9]+).xml$ sitemap.php?id=$1 inside…
-
2
votes2
answers1607
viewsA: I can not put foreign key in PHPMYADMIN
Simple: REFERENCES alunos (id_alunos) is incorrect because the table alunos does not have a column called id_alunos. I believe the right thing would be REFERENCES alunos (id). Another detail is that…