I need to make a MySQL query in the following situation:
I have two ads and likes tables; when a user likes an ad, a record is created in the likes table with the user id and ad id Enjoyed it.
You need to capture the most tanned ads. S...
I need to make a query in mysql , within the WHERE I need that is containing COD_IDENT within a group. That is:
COD_IDENT
5
6
7
My query must return all results where COD_IDENT is equal to 5,6,7...
Personally, what risk would I run if someone wanted to give an injection in this example:
$valorGet = $_GET["valor"];
$sql = "SELECT * FROM tabela WHERE caminho = '$valorGet'";
My question is, can the guy delete (DELETE) or insert (INSERT...
I am studying a bit more in depth PHP and in security issue in PHP I have used the standard anti_injection found on the internet outside and used by many
function anti_injection($sql){
$sql = preg_replace(sql_regcase("/(from|select|insert|dele...
I have a difficulty executing a logic, I have a table in the database that saves the values of an array, takes the values of one or more selected checkboxes and saves with # separating the numbers.
Ex: 0 # 1 # 2 # 3 # 4 # 5 # 6 #.
I want to retu...
I created a class with arrays to be populated with objects, I made the select from the database, then I made a foreach to create a new object with each row of the select return and save those objects in the array. >
But when I try to cr...
I created a database through the workbench
ButIcannotfinditfromtheMacterminal.HowdoIworkonthesamedatabase?Howtofindthedatabasecreatedbytheworkbench?Andviceversa...I'mconnectingthroughthecommandmysql-hlocalhost-uroot-pthroughtheterminal.
...
I'm trying to make a listing of users who logged in and at the same time a count of how many times each user logged, from logins records in a table, I do not know how to explain very well,
MySQL table (logins):
Nome | Hora_de_Login
---------...
I do not know what happens in the code. It does not error, but also does not insert and does not go to the Login screen and also does not enter the else "error"