Home
Forums
Members
Search
Help
New topics
Todays topics
Website
Welcome Guest, Not a member yet?
Register
Sign In
Login
Username:
Password:
Remember me
Lost Password?
CodeIgniter Forums
Archived Discussions
Archived General Discussion
how can I create an empty database query object?
Pages (2):
« Previous
1
2
Share on Google
Share on Facebook
Share on Twitter
View a Printable Version
Subscribe to this thread
Add Poll to this thread
Send thread to a friend
Linear Mode
Threaded Mode
how can I create an empty database query object?
El Forum
Guest
#11
04-09-2009, 01:03 PM
[eluser]NogDog[/eluser]
Something that I just thought of: there's actually no need to query a table:
Code:
SELECT 1 WHERE 1=2
El Forum
Guest
#12
08-20-2012, 07:53 AM
[eluser]Reevak[/eluser]
Since nobody answered your question properly, this is how you create an empty DB object in CI 2.1
$query = new CI_DB_mysql_result();
Then if you run $result = $query->result_array(); it won't break
El Forum
Guest
#13
08-20-2012, 07:57 AM
[eluser]Reevak[/eluser]
Create an empty DB object like this:
Code:
$query = new CI_DB_mysql_result();
And it won't break if you run this:
Code:
$query_thread = $query->result_array();
Pages (2):
« Previous
1
2
--------------------
Private Messages
User Control Panel
Who's Online
Search
Forum Home
General
-- News & Discussion
-- Events
-- Lounge
-- Regional User Groups
Using CodeIgniter
-- Installation & Setup
-- Model-View-Controller
-- Libraries & Helpers
-- Best Practices
-- Choosing CodeIgniter
-- General Help
CodeIgniter 4
-- CodeIgniter 4 Roadmap
-- CodeIgniter 4 Development
-- CodeIgniter 4 Feature Requests
-- CodeIgniter 4 Support
-- CodeIgniter 4 Discussion
-- CodeIgniter 4 Addins
Development
-- CodeIgniter 3.x
-- CodeIgniter 2.x
-- Issues
-- NetBeans Plugin
External Resources
-- Spotlight
-- Learn More
-- Jobs
-- Addins
Archived Discussions
-- Archived Libraries & Helpers
-- Archived Development & Programming
Theme © iAndrew 2016 -
Forum software by © MyBB