Welcome Guest, Not a member yet? Register   Sign In
v 1.3.3 grocery CRUD - an automatic Codeigniter CRUD
#31

[eluser]electronik_0[/eluser]
looks great Thanks
#32

[eluser]tieungao[/eluser]
this is also good if can make new version to work with template (header, footer,..) and easy to merge with HMVC.

I love this plugin so much but difficult for me to enroll in HMVC.
#33

[eluser]web-johnny[/eluser]
[quote author="tieungao" date="1303290112"]this is also good if can make new version to work with template (header, footer,..) and easy to merge with HMVC.

I love this plugin so much but difficult for me to enroll in HMVC.[/quote]

Its really worth it to learn to write in MVC . In the beginning it's a little difficult but after you learn it , there is no way back to write php scripts from the scratch again :-).

I have a suggestion for you . I do it in many projects that don't use frameworks or use another framework like kohana, cakephp etc. You can create a folder to your project . For example "admin" and copy all your codeigniter code there. So you have your project that works fine and you also have your administrator in codeigniter. Its really really easy (espacially with CI 2.0.0 that there is no need to config anything). The only config that you will add is the database config and the CRUD. That's it.

I think its simple.

PS. grocery CRUD has template at templates/frontend/default/template.php
#34

[eluser]Joker[/eluser]
Great work for u grad.. for mysql doing great on my application, but when i transfer to mssql default driver from ci i got blank white page when access the function ..

For mssql i got make change for SET NAMES = UTF8 (i don't know how to replace on mssql ) and

SHOW Column , when looks select data type from tabel .... i make view on mssql with but i exec With EXEC SHOW COLUMN

Still Blank white in page ?...... any sugested what's wrong in my styntac
#35

[eluser]web-johnny[/eluser]
[quote author="Joker" date="1303461339"]Great work for u grad.. for mysql doing great on my application, but when i transfer to mssql default driver from ci i got blank white page when access the function ..

For mssql i got make change for SET NAMES = UTF8 (i don't know how to replace on mssql ) and

SHOW Column , when looks select data type from tabel .... i make view on mssql with but i exec With EXEC SHOW COLUMN

Still Blank white in page ?...... any sugested what's wrong in my styntac[/quote]

The blank wepbage is because you have the error_reporting(0); Go to your index.php and change the error_reporting to E_ALL ( if you have 1.7.3 - 2.0.1) or define('ENVIRONMENT', 'development'); if you use 2.0.2 . Please do this first, because the error can be everywhere. If you are more specific I can help you. As you have seen ALL the code for the database is on the model. You are in the right place...
#36

[eluser]Unknown[/eluser]
I just downloaded g-crud and now I have an error

Quote:Fatal error: Call to undefined method CI_Output:Confusedet_template() in C:\xampp\htdocs\test\application\controllers\crud.php on line 20

and line 20

Code:
$this->output->set_template('custom_cms');

how to solve it, any idea?

PS: I'm using CI 2.02
#37

[eluser]web-johnny[/eluser]
[quote author="geaper" date="1303489520"]I just downloaded g-crud and now I have an error

Quote:Fatal error: Call to undefined method CI_Output:Confusedet_template() in C:\xampp\htdocs\test\application\controllers\crud.php on line 20

and line 20

Code:
$this->output->set_template('custom_cms');

how to solve it, any idea?

PS: I'm using CI 2.02[/quote]
You have to copy-paste all the files and not only the library. This error means that you didn't copy the folder core. And there I have MY_Output that have the function set_template
#38

[eluser]Joker[/eluser]
[quote author="web-johnny" date="1303470852"][quote author="Joker" date="1303461339"]Great work for u grad.. for mysql doing great on my application, but when i transfer to mssql default driver from ci i got blank white page when access the function ..

For mssql i got make change for SET NAMES = UTF8 (i don't know how to replace on mssql ) and

SHOW Column , when looks select data type from tabel .... i make view on mssql with but i exec With EXEC SHOW COLUMN

Still Blank white in page ?...... any sugested what's wrong in my styntac[/quote]

The blank wepbage is because you have the error_reporting(0); Go to your index.php and change the error_reporting to E_ALL ( if you have 1.7.3 - 2.0.1) or define('ENVIRONMENT', 'development'); if you use 2.0.2 . Please do this first, because the error can be everywhere. If you are more specific I can help you. As you have seen ALL the code for the database is on the model. You are in the right place...[/quote]

Thanks for quick answer ,... i will try your suggestion, yup the error was on the model , when SET NAMES = UTF8 firts error (i was disable it) after that on SHOW COLUMN for looking Structure of table (i create view on mssql with name Show_column)i change with EXE Show_column 'table_name'
After that was blank ....

OK i will inform next ...


Hem the result was
"Fatal error: Cannot access empty property in I:\susilo\xampp\htdocs\crudme\application\third_party\grocery_crud\libraries\grocery_crud.php on line 852
"

maybe can u try it


CREATE procedure [dbo].[Show_Columns]
(
@table_name nvarchar(384)
) as
begin
Select
column_name as Field,
data_type+cast('(' as varchar)+cast(character_maximum_length as varchar)+cast(')' as varchar) as 'Type',
is_nullable as 'Null',
'' as 'Key',
column_default as 'Default',
'' as Extra
from information_schema.columns WHERE table_name = @table_name
end

the result was like SHOW COLUMN on mysql...

now need help about it
#39

[eluser]web-johnny[/eluser]
I didn't tested in mssql . I worked with mssql and only with visual studio and linq is good . Without this really I hate MSSQL and I didn't tested on it. I didn't even install it on my computer . Sorry...
But why you use mssql ? Ok if you find the problem please send it to me (just post the code of the model) , so and other people knows about this.

Thank you very much
#40

[eluser]Joker[/eluser]
[quote author="web-johnny" date="1303519574"]I didn't tested in mssql . I worked with mssql and only with visual studio and linq is good . Without this really I hate MSSQL and I didn't tested on it. I didn't even install it on my computer . Sorry...
But why you use mssql ? Ok if you find the problem please send it to me (just post the code of the model) , so and other people knows about this.

Thank you very much[/quote]

I know i got bad choice when i chosee mssql for this project.

ok the model


function __construct()
{
parent::__construct();

$this->db->query('set names utf8'); === this line made the firts error
}


then i disable it () i didn't made change just // next it


after then this function

function get_field_types_basic_table()
{
$db_field_types = array();
//foreach($this->db->query("SHOW COLUMNS FROM {$this->table_name}")->result() as $db_field_type)
foreach($this->db->query("EXEC Show_Columns {$this->table_name}")->result() as $db_field_type)

{

$type = explode("(",$db_field_type->Type);
$db_type = $type[0];

if(isset($type[1]))
{
$length = substr($type[1],0,-1);
}
else
{
$length = '';
}
$db_field_types[$db_field_type->Field]['db_max_length'] = $length;
$db_field_types[$db_field_type->Field]['db_type'] = $db_type;
$db_field_types[$db_field_type->Field]['db_null'] = $db_field_type->Null;
$db_field_types[$db_field_type->Field]['db_default'] = $db_field_type->Default;
$db_field_types[$db_field_type->Field]['db_extra'] = $db_field_type->Extra;
}

the blue was the originial made change with the red one

i made some procedure on mssql like i sad before

after that

was on lib

line 852

=====
protected function showList($ajax = false)
{
$ci = &get;_instance();

$data = $this->get_common_data();

$data->order_by = $this->order_by;

$data->types = $this->get_field_types();

$data->list = $this->get_list();
$data->list = $this->change_list($data->list , $data->types);

$data->total_results = $this->get_total_results();

$data->columns = $this->get_columns();
$data->primary_key = $this->get_primary_key();
$data->add_url = $this->getAddUrl();
$data->edit_url = $this->getEditUrl();
$data->delete_url = $this->getDeleteUrl();
$data->ajax_list_url = $this->getAjaxListUrl();
$data->ajax_list_info_url = $this->getAjaxListInfoUrl();

$data->unset_add = $this->unset_add;
$data->unset_edit = $this->unset_edit;
$data->unset_delete = $this->unset_delete;

if($data->list === false)
{
throw new Exception('It is impossible to get data. Please check your model and try again.', 13);
$data->list = array();
}

foreach($data->list as $num_row => $row)
{
$data->list[$num_row]->edit_url = $data->edit_url.'/'.$row->{$data->primary_key};
$data->list[$num_row]->delete_url = $data->delete_url.'/'.$row->{$data->primary_key};
}

if(!$ajax)
{
$data->list_view = $this->_theme_view('list.php',$data,true);
$this->_theme_view('list_template.php',$data);
}
else
{
$ci->output->unset_template();
$this->_theme_view('list.php',$data);
}
}


I think ... i was enable read from the model that i was made EXEC show_column

NOt like Show Column on Mysql


ok that was i found on mssql

thank's

maybe other can help this great crud u have made




Theme © iAndrew 2016 - Forum software by © MyBB