sonicthehedgehog Posted March 6, 2019 Share Posted March 6, 2019 I wonder if somebody can help me please, I’ve got a website that has been working without any problems for over a year then the other day it stopped. I discovered that my hosts had changed things and the root directory was no longer the same. I updated this and the site is now back but all DB query’s are failing and I don’t know why. If I take the select query and run it direct in PHPMyAdmin then I get results but not he site I don’t so would be grateful for any assistance please. I’m using this to connect: function dbselect( $query,$dblink ) { if( $result=$GLOBALS[$dblink]->query( $query ) ) { while( $row=$result->fetch_array( MYSQLI_ASSOC ) ) { $dbdata[]=$row; } if( !isset( $dbdata ) ) { $dbdata=false; } if( is_object( $result ) ) { $result->close(); } return( $dbdata ); } else { logdberr( $query,'Query failed ('.$GLOBALS[$dblink]->error.')' ); exit(); } } mysqli_close($dbLinkInt); } It fails every time but if I run select * from feeds where product_feed_id=5671 in PHPMyAdmin I get the product I’m after. If it helps the version is 5.5.60-MariaDB Thanks in advance Link to comment Share on other sites More sharing options...
justsomeguy Posted March 6, 2019 Share Posted March 6, 2019 What's the error message from the query? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now