Linked Questions

6 votes
5 answers
5k views

I need to make a simple query $array_of_ids = array(); //poulate $array_of_ids, they don't come from another db but from Facebook //so i can't use a subquery for the IN clause $wpdb->prepare("...
Nicola Peluchetti's user avatar
0 votes
1 answer
731 views

I wanna add dynamically variables to mysqli:bind_param ... I saw a lot of tutorials and examples but the code I made isn't working for hours now. $params = array(''); $params[0] = $variableType; //...
Ilario Engler's user avatar
0 votes
1 answer
414 views

I have been trying to use call_user_func_array()but dont seem to get it right. $sql_sentence = "SELECT * FROM test_table WHERE Fag = ? AND (" . $sql_subject . ") AND (" . $sql_grade . ") AND (" . $...
William82's user avatar
3 votes
0 answers
174 views

Am trying to run this code: foreach ($tags as $tag) { $tag = strtolower($tag); $tag = trim($tag); echo "<br>" . $tag . " checking<br>"; $query = "SELECT `tag_id`, `...
Mina Messiah's user avatar
1 vote
1 answer
114 views

Right now I'm currently attempting to make a MySQLi class to make typing code easier and so it looks cleaner and is more usable overall. I'm attempting to write a function which will execute a query ...
Matthew's user avatar
  • 93
0 votes
0 answers
74 views

I am trying to use an array in the where clause of a MySQL query but the query is not displaying the posted array correctly. I post the array and the console displays: [RoomOverrideRoomSelect] => ...
DCJones's user avatar
  • 3,501
0 votes
0 answers
38 views

I have a function which inserts data into a mysql database table. How can I use mysqli prepared statements to make sure the values are safe? //Inserts a new row into the database. //takes an array of ...
Ciprian's user avatar
  • 3,226
0 votes
0 answers
33 views

I'm doing a webapp with PHP and I have an array with some values which is greatherThan[], I need to make a prepared statement for each value of the array, for example if the array has the values 4,5,6 ...
C.Xammar's user avatar
  • 167
0 votes
0 answers
32 views

I am doing update the table values of multiple rows. So i using the query is UPDATE `notification` SET `flag`='1' WHERE id IN (1,2,3,4) Where it is working as fine. But don't how to use it in php. ...
Fazil's user avatar
  • 109
0 votes
0 answers
27 views

Following is the code I am testing now for a comparison website. But I couldn't make it work with the prepared statement function. My code works well if I didn't use the prepared statement method. The ...
Malavika P's user avatar
1 vote
0 answers
27 views

I have an html form from which i trying to dynamically search for data from the database Here is the minified html which contains the form and the div with the class results-area containing some php ...
kellymandem's user avatar
  • 1,769
0 votes
0 answers
25 views

can i put more then just 1 int in where mysqli select. and can i put var in at. $selectQuery22 = mysqli_query($db, "SELECT * FROM `messages` WHERE `user_id` in(21,2) ORDER BY `date`DESC"); i put ...
DoDe Al Hasi's user avatar
0 votes
0 answers
25 views

I am getting a PHP Warning: mysqli_stmt_bind_param() expects parameter 2 to be string, array given. The line in question is: mysqli_stmt_bind_param($stmt, $types, $values); I guess this is because $...
user avatar
1 vote
2 answers
54 views

I have database with users, I want to show results without users that i have id's in array. How should i do it, any ideas? <?php include_once "dbh.php"; session_start(); $id = $_SESSION['userId'];...
zonio's user avatar
  • 15
2738 votes
14 answers
263k views

What are the technical reasons for why one shouldn't use mysql_* functions? (e.g. mysql_query(), mysql_connect() or mysql_real_escape_string())? Why should I use something else even if they work on ...
Madara's Ghost's user avatar

15 30 50 per page