wright67uk Posted March 17, 2013 Share Posted March 17, 2013 I'm not sure why but I can't get $notes to print. I'm very new to these methods and Was wondering if anyone could tell me where I'm going wrong and how I can debug I'm similar circumstances. Quote Link to comment https://forums.phpfreaks.com/topic/275772-echoing-and-debuging/ Share on other sites More sharing options...
wright67uk Posted March 17, 2013 Author Share Posted March 17, 2013 <?php include 'connect.php'; //$date = date('Y-m-d H:i:s'); //$username = "Ed"; $horse = isset($_GET['horse'])&& $_GET['horse']!=''?$_GET['horse']:''; echo "<h1>" . $horse . "</h1>"; if ($stmt = $mysqli->prepare("SELECT horse_name, username, Notes, publish_date FROM notes WHERE horse_name = ?")); { $stmt->bind_param("s", $horse); $stmt->execute(); $stmt->bind_result($horse_name, $username, $notes, $publish_date); } while ($stmt->fetch()) { printf("%s added %s \n", $username, $notes); echo "<br/><br/>-------------------------<br/>"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/275772-echoing-and-debuging/#findComment-1419146 Share on other sites More sharing options...
wright67uk Posted March 17, 2013 Author Share Posted March 17, 2013 Apparently, if you have longtext present ($notes), you HAVE to call store_result before using bind_result. Quote Link to comment https://forums.phpfreaks.com/topic/275772-echoing-and-debuging/#findComment-1419185 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.