Skip to main content
How are we doing? Please help us improve Stack Overflow. Take our short survey
0 votes
0 answers
181 views

Json.dumps alternative in Redshift

I have strings like Origi\"nal and Origi"nal . I want to convert them to raw string and then to a Json String and write to a table in Redshift. Example output of "select col from ...
Ayushi Bansal's user avatar
0 votes
0 answers
28 views

How do I properly pass an url with get variables as a get variable? [duplicate]

So, I have a link like this... http://my-affiliate.com?pr=9&user=274934&ad_id=12598 And I am trying to pass it through a link with get variables, such as... http://my-website.com/ad-...
Donald Faulknor's user avatar
5 votes
2 answers
4k views

MySQL: What does means "escape '!'" on query

Editing someone else's code found this query: SELECT c.name AS category_name, p.id, p.name, p.description, p.price, p.category_id, p.created FROM products ...
quantme's user avatar
  • 3,655
1 vote
1 answer
164 views

How to convert SQL in mysql binlog to html?

My site was hacked and I was able to retrieve some SQL from binlog, they look like <p>some text</p>\r\n<p><img src=\"images/2019-04-27/1.jpg\" alt=\"1\" /></p> I need to ...
shenkwen's user avatar
  • 3,900
2 votes
1 answer
2k views

How to detect if a string contains PHP code? PHP

I am keeping record of every request made to my website. I am very aware of the security measurements that need to be taken before executing any MySQL query that contains data coming from query ...
Eduardo Ponce de Leon's user avatar
0 votes
0 answers
250 views

mysqli_real_escape_string() does not work in database

I am using mysqli_real_escape_string() function for prevent SQl Injection.My code <?php // open a connection $dhost = 'localhost'; $duser = 'user'; $dpw = 'pass'; $dname = 'db_name'; $connection ...
user avatar
0 votes
1 answer
501 views

$mysqli->escape_string - can it be used without specifying exact field name

I have code that generalizes building the SQL string to insert a record into a table by (1) setting the 'name' of the form element to be the same as the table column to which it corresponds, and (2) ...
rfm's user avatar
  • 3
-2 votes
1 answer
2k views

How to show the original character like \n \t in mysql in a select statement

when I run select statement from mysql database, characters like \n \t will be escaped. Is there a way to see these original characters in mysql? What I want to see is something like "java.lang....
Bargitta's user avatar
  • 2,426
0 votes
1 answer
439 views

How to bind queries that use variables for the LIMIT parameter in Codeigniter

I am trying to fix a query in codeigniter, by binding queries for safety. But I am unable to use "?" in the limit parameter of the sql query. Without using codeigntier's query builder, how can I fix ...
Jack Hanson's user avatar
0 votes
1 answer
616 views

insert blob not working (mysql_real_escape_string)

I am trying to copy image blobs from one table to another, and it is not working, since the mysql_real_escape_string () is no longer available. The special characters in the blob are blocking the ...
Andrew's user avatar
  • 63
0 votes
0 answers
136 views

Escape string in mysqli

I have a function to escape string in my OOP PHP project like this.... public function escape($string) { $query = mysqli_real_escape_string($this->connection, $string); return $query; } is ...
Iam Loki's user avatar
0 votes
1 answer
1k views

mysqli_real_escape_string() for entire $_POST array in php [duplicate]

I have $_POST with 20 keys. I want to apply mysqli_real_escape_string() for the entire $_POST array. So, should I apply mysqli_real_escape_string() to all 20 keys separately? Or is there any loop or ...
Bhavesh Patel's user avatar
1 vote
0 answers
1k views

AngularJS and PHP: escaping and unescaping JSON string

I was trying to save some data (a table) as JSON in my database with AngularJS and PHP. For that, I would want to convert it to string first and then escape special characters (avoiding SQL injection)....
Aleksey Solovey's user avatar
0 votes
2 answers
4k views

mysql_real_escape_string() function not working in wordpress WP_Query?

We have tried this way. But it is not working. please any one tell alternative method in wordpress $wpdb->query("UPDATE ".$wpdb->prefix."recommend_bets SET `title`='".mysqli_real_escape_string($...
Arun Kumar's user avatar
  • 1,667
1 vote
0 answers
218 views

PHP real_escape_string() - allow emoji references [duplicate]

I have a web service which inserts various user input into a MySQL DB. My DB insert statement uses $db->real_escape_string() for security on all input. However this seems to be stripping out ...
Mitya's user avatar
  • 34.7k

15 30 50 per page
1
2 3 4 5
25