WordPress.org

Ready to get started?Download WordPress

Forums

prepare escaping (2 posts)

  1. bwoogie
    Member
    Posted 4 years ago #

    When I $wpdb->prepare or $wpdb->escape It adds \ before '
    and when I call it back from the db I have all these slashes in front of single quotes/apostrophes
    I'm preparing when inserting to the db and when retrieving what am I missing?

    $myq = "UPDATE $ROLLCALL_table_name SET email=%s, phone=%s, birthday=%s, firstname=%s, lastname=%s, bio=%s, image=%s WHERE username=%s";
    
    		    if($wpdb->query($wpdb->prepare($myq, $email, $phone, $birthday, $firstname, $lastname, $bio, $image, $fieldname)) === FALSE)
    	{
  2. bwoogie
    Member
    Posted 4 years ago #

    basically, is there a wordpress version of stripslashes? or do I just use the php one?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.