[Tutorial] MySQL plugin ORM usage tutorial - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Tutorials (
https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] MySQL plugin ORM usage tutorial (
/showthread.php?tid=461766)
Re: MySQL plugin ORM usage tutorial -
AroseKhanNiazi - 10.06.2015
After following the tutorial i won't need to create the tables or anything just enter the mysql data base pass user ip etc and done ?
Re: MySQL plugin ORM usage tutorial -
Konstantinos - 10.06.2015
Quote:
Originally Posted by AroseKhanNiazi
After following the tutorial i won't need to create the tables or anything just enter the mysql data base pass user ip etc and done ?
|
The table must have been created before.
Quote:
Originally Posted by AndreT
First thing that needs to be done is creating an ORM instance by calling id = orm_create(table_name[]) where the table_name array consists of your MySQL table name that you wish the ORM instance to control.
|
Re: MySQL plugin ORM usage tutorial -
Axuj - 18.07.2015
Hey, I'm interested in using ORM but I have a question...
If my user data in mysql is seperated in three tables is there a way to handle all the data with orm or not?
Re: MySQL plugin ORM usage tutorial -
Beanz007 - 22.07.2015
Nice tutorial!I finally learnt how these things work!
Re: MySQL plugin ORM usage tutorial -
maddinat0r - 22.07.2015
Quote:
Originally Posted by Axuj
Hey, I'm interested in using ORM but I have a question...
If my user data in mysql is seperated in three tables is there a way to handle all the data with orm or not?
|
orm_select, orm_insert, orm_update and orm_delete work only on the table you specified when creating the ORM instance. However, you can use your own queries to fetch data and simply assign it to your registered variables through "orm_apply_cache". That means you can use the "automatic assignment of registered variables" feature, but not the "automatic query generation and execution" feature.
Re: MySQL plugin ORM usage tutorial -
Beanz007 - 22.07.2015
Will it be a problem if I will have one table with ~100 columns,using the orm?I mean will everything work fine without lags and such things?