OK, I’m sure I’m being blind again and missing something obvious, but i can’t figure out what.
I am running a query against my DB and it is returning 0 results, even though when I run the query directly against the database using my DB admin panel it returns exactly what I expect it to.
The $NumResults and subsequent echo statement I just put in trying to see what I am returning and it shows me 0. There should be about 10 records returned that I want to use to populate a dropdown field on my website.
Hopefully someone can give me that gently nudge (or a hard smack) to get me back on the right track.
Nope, got these errors when I changed those values:
Warning: mysqli_query() expects at least 2 parameters, 1 given in /var/www/vhosts/mysite.com/httpdocs/myapp/includes/inc_catdropdown.inc on line 4
Warning: mysqli_error() expects parameter 1 to be mysqli, string given in /var/www/vhosts/mysite.com/httpdocs/myapp/includes/inc_catdropdown.inc on line 5
Unable to run query:
Yep, I take that EXACT query (cut/paste) and run it in HeidiSQL linked to the same database… CRAP! HeidiSQL is linking to my LIVE database, NOT me dev one. See? I knew it was me being stupid!
Greg
Sheesh! Maybe it’s time to call it a night. No results happens when you have failed to populate your development database with real data! Sheer BRILLIANCE on my part!
Thanks again for the gentle slap upside the head, I promise I’ll quit for the night.
Greg