Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 9 results for
ladakh
- Page 1
Error in php project
Programming
Web Development
6 Years Ago
by ajay@7838
… class='albumDetail'> <a href='find_holiday.php?goto=Leh
Ladakh
'><img class='img-responsive imghover' src='upload/$r…='220' height='150' > <span class='albumtitle'>Leh
Ladakh
</span> </a> </div> <…
Re: Error in php project
Programming
Web Development
6 Years Ago
by rproffitt
Line 7 conforms to neither method documented at https://www.php.net/manual/en/mysqli-result.fetch-array.php Time to read that page and pick a style.
Re: Error in php project
Programming
Web Development
6 Years Ago
by Dani
I'm not sure what you mean, rproffitt? It looks like he's looping through each row in the result set generated from query $q, and saving the row in an array $r for the iteration of the loop. That's what I do as well.
Re: Error in php project
Programming
Web Development
6 Years Ago
by rproffitt
Line 7's call can have an object oriented or procedural style. While it looks like he's doing that, the line does not look valid to me. This is why I supplied a link to the documentation.
Re: Error in php project
Programming
Web Development
6 Years Ago
by alan.davies
I'm assuming mysqli query is returning false, hence the boolean msg.
Re: Error in php project
Programming
Web Development
6 Years Ago
by rproffitt
OK, here's the example for the object oriented method. $query = "SELECT Name, CountryCode FROM City ORDER by ID LIMIT 3"; $result = $mysqli->query($query); /* numeric array */ $row = $result->fetch_array(MYSQLI_NUM); Line 7 in the OP's source is incorrect in my view as the $q is well, unexpected. …
Re: Error in php project
Programming
Web Development
6 Years Ago
by alan.davies
While I like the oop method, I can't see anything wrong with the procedural code other than I'd enclose the whole thing in a conditional. As in `if($q =....) `
Re: Error in php project
Programming
Web Development
6 Years Ago
by rproffitt
Then again if line 6 fails so will 7. OP needs to test for that.
Re: Error in php project
Programming
Web Development
6 Years Ago
by alan.davies
>Then again if line 6 fails so will 7. OP needs to test for that. That was my point. I believe Line 6 is returning 'false'. From the manual on `mysqli_query`: >Returns FALSE on failure. For successful SELECT, SHOW, DESCRIBE or EXPLAIN queries mysqli_query() will return a mysqli_result object. For other successful queries mysqli_query() …
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC