Welcome Guest, Not a member yet? Register   Sign In
IgnitedRecord 1.0 pre-release

[eluser]dcunited08[/eluser]
@m4rw3r

I figured out to put the fk in the has_many array in the machine_model.

It seems there is a bug in your _protect_identifiers with the mssql driver, will report back with a fix.

UPDATE: I put a break at line 2298 in file ignitedquery.php and it worked.
The issue is it is putting quotes around the table name and making MSSQL error out. A similar but was in the 1.6.3 ver CI_Active_Record class for MSSQL (it has been fixed in 1.7.0).

[eluser]amrnt[/eluser]
why i have some problems in QUERIES?
e.g. .......
SELECT `posts`.*
FROM `posts`
ORDER BY `title` DESC
.......
and the problem is in (`posts`.*) !!!

[eluser]sophistry[/eluser]
your question is unclear. please post code.

[eluser]amrnt[/eluser]
when i run an SQL query like this ( SELECT `posts`.* FROM ..... )
it represents me undefined (`posts`.*) column !!??

[eluser]m4rw3r[/eluser]
What SQL server do you use?

[eluser]amrnt[/eluser]
MySQL 5.0.11 ..

[eluser]m4rw3r[/eluser]
Never had that kind of problem, are you sure that it isn't complaining about the title column?

[eluser]amrnt[/eluser]
... ops .. will DONE ..

Thanks for this great library!!!
but i have a question ... why limit() doesn't work with this ? or doesn't make sense!

controller

Code:
$data['category'] = $this->category->order_by('posts.id', 'DESC')->limit(1)->join_related('posts')->find($id);
$data['posts'] = $data['category']->posts;

SQL

Code:
SELECT `posts`.`id` AS `posts_id`, `posts`.`title` AS `posts_title`, `posts`.`body` AS `posts_body`, `posts`.`created_at` AS `posts_created_at`, `posts`.`updated_at` AS `posts_updated_at`, `posts`.`permalink` AS `posts_permalink`, `posts`.`category_id` AS `posts_category_id`, `categories`.*
FROM `categories`
LEFT JOIN `posts` ON categories.id = posts.category_id
WHERE `categories`.`id` = '4'
ORDER BY `posts`.`id`  DESC

where i have to put limit() to limit my posts?

[eluser]m4rw3r[/eluser]
The problem with the disappearing LIMIT is that I made a wrong return value from a conditional I inserted in the find single methods, I've fixed it now.

The purpose of the conditional is to determine if to apply a limit 1, or if to skip limit (joined).

[eluser]amrnt[/eluser]
yeah ,, 'Changeset 219 for trunk/application/libraries/ignitedrecord/ignitedrecord.php'
it works fine now !
thanks




Theme © iAndrew 2016 - Forum software by © MyBB