nimoosh
یک شنبه 10 خرداد 1394, 14:08 عصر
سلام دوستان . یک کلاس طراحی کردم که قابل ویرایش هم است .
100% ایرادات زیادی داره اما برای من کار را خیلی راه انداخت . مثلا هنوز bind رو اجرا نکردم که در ورژن بعدی با یک سری تابع دیگر ای کار رو خواهم کرد . ممنون .
تقاضا دارم با review کردن این کلاس کمک کنید تا کلاس بالا بیاد . توضبحات مربوط به کلاس :
LINK : https://sourceforge.net/projects/nimapdoclass/files/
How to use This class
in this class we have 7 functions as ( Insert , select , select one row , select with Like statement , Delete , Update , Select random ) with just one line coding .
the main thing is very good is that , i create this class with Pdo connection that has a good security for your web site.
Example of insert
$obj= new nimaPDo;
$table='tableNAme';
$params=array('col1','col2','col3');
$values=array('val1','val2','val3');
$obj->insert($table,$params,$values);
Example of Update
$obj= new nimaPDo;
$table='tableNAme';
$ceriteria="id='5'";
$params=array('col1','col2','col3');
$values=array('val1','val2','val3');
$obj->update($table,$params,$values,$ceriteria);
Example of select
$obj= new nimaPDo;
$table='tableNAme';
$params=array('col1','col2','col3');
$values=array('val1','val2','val3');
$obj->select($table,$params,$values);
Example of select like
$obj= new nimaPDo;
$table='tableNAme';
$params=array('col1','col2','col3');
$values=array('val1','val2','val3');
$obj->select_like($table,$params,$values);
Example of select One
$obj= new nimaPDo;
$table='tableNAme';
$params=array('col1','col2','col3');
$values=array('val1','val2','val3');
$obj->select_one($table,$params,$values);
Example of select random
$obj= new nimaPDo;
$table='tableNAme';
$params=array('col1','col2','col3');
$values=array('val1','val2','val3');
$obj->select_rand($table,$params,$values);
100% ایرادات زیادی داره اما برای من کار را خیلی راه انداخت . مثلا هنوز bind رو اجرا نکردم که در ورژن بعدی با یک سری تابع دیگر ای کار رو خواهم کرد . ممنون .
تقاضا دارم با review کردن این کلاس کمک کنید تا کلاس بالا بیاد . توضبحات مربوط به کلاس :
LINK : https://sourceforge.net/projects/nimapdoclass/files/
How to use This class
in this class we have 7 functions as ( Insert , select , select one row , select with Like statement , Delete , Update , Select random ) with just one line coding .
the main thing is very good is that , i create this class with Pdo connection that has a good security for your web site.
Example of insert
$obj= new nimaPDo;
$table='tableNAme';
$params=array('col1','col2','col3');
$values=array('val1','val2','val3');
$obj->insert($table,$params,$values);
Example of Update
$obj= new nimaPDo;
$table='tableNAme';
$ceriteria="id='5'";
$params=array('col1','col2','col3');
$values=array('val1','val2','val3');
$obj->update($table,$params,$values,$ceriteria);
Example of select
$obj= new nimaPDo;
$table='tableNAme';
$params=array('col1','col2','col3');
$values=array('val1','val2','val3');
$obj->select($table,$params,$values);
Example of select like
$obj= new nimaPDo;
$table='tableNAme';
$params=array('col1','col2','col3');
$values=array('val1','val2','val3');
$obj->select_like($table,$params,$values);
Example of select One
$obj= new nimaPDo;
$table='tableNAme';
$params=array('col1','col2','col3');
$values=array('val1','val2','val3');
$obj->select_one($table,$params,$values);
Example of select random
$obj= new nimaPDo;
$table='tableNAme';
$params=array('col1','col2','col3');
$values=array('val1','val2','val3');
$obj->select_rand($table,$params,$values);