This is my first Post here, so first I lie to day hello to all
My Question:
I updated my System to PHP 7 recently, so my mysql scripts stopped working. To understand the changes, I created a simple test script, I checked a w3-school tutorial, to make sure I made all right. Then I executed the SELECT query in phpMyadmin to make sure it’s right and it worked. BUT … if I run my script in a browser, I do get “MYSQL-DATABASE-Connection successful”, but I do not get any output of my SELECT-Query. Print_r($result) echos: mysqli_result Object([current_field]=>0 [field_count]=>1 [lengths]=> [num_rows]=>1 [type]=>0) (I was actually awaiting something like "Resource ID #23 - so I do not know how to read this output).
The Database “Server_ip” contains 4 colums with just 1 row: sid, lan_ip, wlan_ip, public_ip
The code:
"; print_r($result); $row = mysqli_fetch_array($result,mysql_assoc); echo $row['public_ip']; mysqli_free_result($result); mysqli_close($con); ?>
Can anyone give me a hint why I do not get a result of my SELECT-Query? Thanks!