When I am running this query it is not returning any results. I believe there must be a syntax error as it is stopping the code from running later down the page. Anyway, I can't see where I am going wrong.
If nothing seems to be the problem with the syntax I can post my database structure, if necessary.
$tag = $_GET['tag']; $stmt = $mysqli->prepare('SELECT trips.trip_id FROM tags JOIN trips ON trips.post_id = tags.post_id WHERE tag = ?'); $stmt->bind_param('s', $tag); $stmt->execute(); $stmt->bind_result($trip_id); ?> <div id="map_canvas<?php echo $trip_id ?>" style="height:400px;"></div><?php
Update: I have ran the error reporting script and this is what is comes out with...
Fatal error: Call to a member function bind_param() on a non-object in /Users/.../server/inc/feed-algorithm.php on line 37