I'm writing an app that allows you to filter database results based on Location and Category.
If someone was to search for Liverpool under the Golf category the URI would be /index.php/search/Liverpool/Golf.
Should someone want to search by Location but not category, they would be sent to /index.php/search/Liverpool
However, should so...
I'm new to unit-testing, so this is maybe a little dumb question.
Imagine, we have a simple model method.
public function get_all_users($uid = false, $params = array()){
$users = array();
if(empty($uid) && empty($params)){return $users;}
$this->db->from('users u');
if($uid){
$this->db->where('u.id',(int)$id);
...
Hello all,
I am using codeigniter. I guess it doesn't matter which php framework I am using.
But before I write my own class is there another that has already been written that allows a user to get the page title and meta tags (keywords, descriptions) of any sit...if they have any.
Any sort of PHP class that does that would be great.
...
Hello all,
I have just realised if I add a particular record to my MySQL database - it will have a date/time of the server and not the particular user and where they are located which means my search function by date is useless! As they will not be able to search by when they have added it in their timezone rather when it was added in t...
I am new to CodeIgniter. I need to process a form. I have a form.html page in view
<html>
<head>
<title>Search</title>
</head>
<body>
<form action="search">
<input type="text" name="search" value="" size="50" />
<div>
<input type="submit" value="Submit" />
</div>
</form>
</body>
</html>
a...
What's the best way to open a URL feed in codeigniter? I'm assuming I can't put the URL in a file upload input, so should I use a normal text input and then validate that the URL is not malicious? If so, what validation tests should I perform on the user inputted string? Would checking the file extension be enough or can this easily be m...
Trying to create a simple 2 table database that lists the contents of various firewire drives, one table with FW number, the other with a file item on that drive number.
eg. fw 233
file -> mike's home movie.mov
I'm very new and can create single tables with queries, but haven't understood querying multiple tables with join.
each d...
I've tried the following method in the past:
<?php
set_time_limit(0);
$_SERVER['PATH_INFO'] = 'cron/controller/index';
$_SERVER['REQUEST_URI'] = 'cron/controller/index';
require_once('index.php');
?>
and putting this in a file in the codeigniter installation directory, calling it cron.php, and then invoking it via:
php /home/[usernam...
I have the following relationship
CType has many Field
Field has many Ctype
and of course the tables used are fields, ctypes, and ctypes_fields.
Normally, the ctypes_fields table should contain only ids referencing the other two tables. However, i'd like to put there a "options" field that will contain some content for the concrete in...
I'm using CodeIgniter (because it's awesome) and I have something like:
<?php echo anchor("/", "whatever.com" ); ?>
However, this results in http://www.whatever.com/.html which is not right. Help?
...
I am going to build a PHP web application and have already decided to use Codeigniter + DataMapper (OverZealous edition).
I have discovered that DataMapper (OverZealous edition) requires the use of an extra association table even when there is actually just a one-to-many relationship.
For example, a country can have many players but a ...
How to remove index.php in codeigniter on Windows 7 and IIS.
I searched net for the solution but result weree based on re-write module of Apache, if anyone has worked on IIS and Windows 7 and had similar situation pls help on this.
I want to work on IIS and Windows 7 and if I can remove index.php while calling any particular controller...
We have a simple database. The User table holds users. The Accounts table holds multiple accounts for each user. The Topics table holds multiple topics for each account.
So, a user would have multiple accounts and each account would have multiple topics. So, if I have a user with id=1 how do I efficiently query all 3 tables to get all t...
value of FORM INPUT Help!!
//this is just a refrence of $nm and $fid from test_model//
$data['fid']['value'] = 0;
$data['nm'] = array('name'=>'fname',
'id'=>'id');
say i have one form_view with
<?=form_label('Insert Your Name :')?>
<?=form_input($nm)?>
and a function to get single row
function get($id...
Hi folks. I've just installed Aptana 2.0, and I'm trying to get Code Assist for Codeigniter. I've never used an IDE before, always stick with my good ol' E-text (Windows version for TextMate). But in every screencast about CodeIgniter, people use Aptana and get benefits of it's awesome Code Assist.
So...any tips for setting it up??
Tha...
I'm new to CodeIgniter and am trying to use the conditional below to determine whether or not the form has been submitted, and then display a certain view if it has. I got the error in the title for some reason and have been troubleshooting the problem for more than half and hour. Does anybody know how I might go about solving this probl...
Hi everyone!
I'm still beginning to get my head around this whole relational-database-thingymawhatsit. Anyway, I'm a PHP programmer so I can do all that shabang. I just need to think what would be the best method for this scenario...
I'm developing a site (with CodeIgniter if that's any help) - a site where users can post content (thi...
I have two tables(entries and tags) with a many-to-many linking table. Right now, I'm making a query to retrieve all the entries that meet my criteria, and a query for each entry to retrieve the tags.
Would there be a way to say, have the tags returned through a new column as an array in the first query?
...
Hi code igniter captcha is not working in my page.My php gd library enabled but no change result
...
Kind sirs,
I'm using Codeigniter to build a blog. I might need a way to redirect a 404 error into a custom 404 page. Just like what Abduzeedo.com's 404 page. Is it possible to control this by using routes? Or should i use controllers to direct it to another view? Thanks very much!
...