• Resolved gottfrieds

    (@gottfrieds)


    I use the follwing code – it is under developmemt:

    	if ($conn->connect_error) {
    		die("Verbindungsfehler: " . $conn->connect_error);
    	};
        $query = "SELECT post_id FROM spd_postmeta WHERE meta_key='E-Mail' AND meta_value='".$email."'";
    	$sql = mysqli_query ($conn, $query);
    	if ($sql!= TRUE) {
        	echo "<br>Error: " . $query . "<br>" . $conn->error . '<br>';
    	    $post_id = 2393;
    	} else {
    		$post_id = $conn->post_id;
    	    echo $post_id;
    	};
        $query = "SELECT meta_value FROM spd_postmeta WHERE meta_key='passwort' AND post_id='".$post_id."'";
        echo $query;
    	$sql = mysqli_query ($conn, $query);
        $vpw = $conn->meta-value;
        echo '<br>'.$vpw;
    

    When I use the query in phpMyAdmin it works finde for both queries. In my php code I get no results. I am a novice – what is wrong???

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘SQL Error’ is closed to new replies.