PHP ActiveRecord: Generalhttp://www.phpactiverecord.org/2015-08-07T16:48:24-04:00An easy to use ORM for PHP
Redmine General: RE: Is activercord still active?http://www.phpactiverecord.org/boards/1/topics/2047?r=2048#message-20482015-08-07T16:48:24-04:00Brian Parks
<p>According to the statistics at <a class="external" href="https://github.com/jpfuentes2/php-activerecord">https://github.com/jpfuentes2/php-activerecord</a>, momentum has slowed down a little bit, but there's a thriving community of people who still use it and are developing/submitting patches for the project. If you look too close at the github repository, the large number of issues that have been opened against the project is misleading; a lot of them are feature requests, edge cases, or discussion points. I'm using it in several projects and finding it to be very stable, so I for one intend to continue supporting it.</p> General: Is activercord still active?http://www.phpactiverecord.org/boards/1/topics/20472015-06-17T09:17:37-04:00Mr. Carl
<p>I see last stable build was 2010 and night build was 2013. So seems activercord not being support anymore?</p> General: problem with multi conditions in findhttp://www.phpactiverecord.org/boards/1/topics/20462015-05-11T09:12:11-04:00atabak saeiddanesh
<p>hi <br />in docs i found how to set conditions as array ... but i have problem whith BETWEEN Operator,<br />i have an advance search whit many Operator , i mean ,i have "=" and "BETWEEN","LIKE" and some other Operators<br />how i can set the conditions array whit BETWEEN ?<br />or <br />is any options to send multiple queries to any phpactive record function or class and that class build my conditions array? <br />"BETWEEN " query have 2 argument (min and max values) and i don't know how to set these in condition's array and how have condition's array with "BETWEEN" and other MySql operators</p>
<p>thanks</p> General: Execute a SELECT query without any Modelhttp://www.phpactiverecord.org/boards/1/topics/20442015-04-14T17:10:35-04:00Rod Elias
<p>Hi folks,</p>
<p>My question is: how do I query a database without having to specify a model?<br />In other words, I would like to execute a rather complex SELECT query involving multiples tables and, because of that, I don't have a Model.<br />Is there a way to execute a raw SQL query without the need to use a Model?</p>
<p>Thanks a lot for any help!</p> General: RE: How to take count of the last query?http://www.phpactiverecord.org/boards/1/topics/2030?r=2036#message-20362014-12-10T07:26:29-05:00Alessandro Taccola
<p>DONT ! imagine $mail = '"; DROP table tt_admin; --'</p> General: RE: Model directory (Noob)http://www.phpactiverecord.org/boards/1/topics/2034?r=2035#message-20352014-12-07T15:31:26-05:00Richard Downing
<p>OK, this always happens when I finally give up and post to a forum. I didn't correctly capitalize the name of the model (er.... Model).</p>
<p>Sorry for the noise.<br />TOF.</p> General: Model directory (Noob)http://www.phpactiverecord.org/boards/1/topics/20342014-12-07T15:28:09-05:00Richard Downing
<p>The examples show the model directory set in the Config, and the model directory not 'required'. Other examples I've found show this too, no 'require' for the model directory. Yet I seem to need a 'require', after the 'require_once' for ActiveRecord.</p>
<p>I'm new to PHP, following 'The PHP Fundamentals' course on Tuts+, so sorry if this is a stupid question. Why do I need a 'require', when others clearly don't?</p>
<p>Oh, and why no 'search' on your forum???!!!!</p>
<p>TOF.</p> General: How to take count of the last query?http://www.phpactiverecord.org/boards/1/topics/20302014-10-30T04:18:23-04:00vinoth kanna
<p>Admin::find_by_sql("SELECT * FROM tt_admin WHERE admin_user = '".$mail."' AND admin_pass = '".$pass.");</p>
<p>Admin::count();<br />this show total count of the table i need ly count last query executed count ?</p> General: Atualização frameworkhttp://www.phpactiverecord.org/boards/1/topics/20162014-07-09T21:02:32-04:00Wesley David Santos
<p>Opá, tudo bem?</p>
<p>Já utilizo algum tempo o PhpActiveRecord, ele é muito bom mas fiz umas adaptações para meu uso e gostaria de compartilhar com vocês onde elas podem ser até adaptações para futuras versões.</p>
<ol>
<li>Alterações</li>
</ol>
<p>1 - Adicionar um 'alias' único para cada tabela possiblitando assim a consulta WHERE de forma mais simples<br /> /** Define uma alias para a tabela **/<br />Ex: static $alias_table = 'u';</p>
<p>2 - Insert Ignore - Possibilita inserir simultâneamente multi registros sem gerar erros</p>
<p>GitHub - <a class="external" href="https://github.com/wesleydavidsantos/phpactiverecord">https://github.com/wesleydavidsantos/phpactiverecord</a></p> General: Set isolation level in transactionhttp://www.phpactiverecord.org/boards/1/topics/20142014-06-16T16:50:34-04:00Salvatore Lapi
<p>Hi ,<br />i want create transaction with isolation level "SERIALIZABLE" is possible? <br />How create transaction!?</p>
<p>Thanks</p> General: RE: so no microsoft sqlsrvhttp://www.phpactiverecord.org/boards/1/topics/2009?r=2013#message-20132014-05-26T05:38:04-04:00Ladislav Gallay
<p>I had some problems with it, but I fixed it. I am using SQL 2014 Server. In SqlsrvAdapter.php:</p>
<p>Add<br /><code>static $datetime_format = 'Y-m-d H:i:s';</code><br />This overrides default datetime_format in Model. There is <b>T</b> (Timezone abbreviation) but SQL don't accept it.</p>
<p>In method <code>query_column_info</code> I changed following:<br /><code>
$sql =
"SELECT c.COLUMN_NAME as field, c.DATA_TYPE as data_type, c.CHARACTER_MAXIMUM_LENGTH AS length, c.NUMERIC_PRECISION_RADIX AS radix, c.COLUMN_DEFAULT AS data_default, c.IS_NULLABLE AS nullable, " .
"COLUMNPROPERTY(OBJECT_ID(TABLE_NAME), c.COLUMN_NAME, 'IsIdentity') AS extra, " .
"(SELECT TOP 1 a.CONSTRAINT_TYPE " .
"FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS a, INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE b " .
"WHERE a.CONSTRAINT_TYPE='PRIMARY KEY' " .
"AND a.CONSTRAINT_NAME = b.CONSTRAINT_NAME " .
"AND a.TABLE_NAME = b.TABLE_NAME AND b.COLUMN_NAME = c.COLUMN_NAME) AS PK " .
"FROM INFORMATION_SCHEMA.COLUMNS c " .
"WHERE c.TABLE_NAME=?";
</code></p>
<p>I added SELECT <b>TOP 1</b> because it was returning multiple lines and throws SQL error.<br />It should works now.</p> General: RE: so no microsoft sqlsrvhttp://www.phpactiverecord.org/boards/1/topics/2009?r=2012#message-20122014-05-26T05:31:53-04:00Francesco Venturini
<p>thanks <br />I am going to test this with my SQL<br />I will post any news from me in a few hours</p> General: RE: RE: so no microsoft sqlsrvhttp://www.phpactiverecord.org/boards/1/topics/2009?r=2011#message-20112014-05-25T04:41:50-04:00Ladislav Gallay
<p>Hi Francesco and anyone else,</p>
<p>I talked to funkjedi (former author of sql adapter) and he put his code back to GitHub and there's open pull request (<a class="external" href="https://github.com/jpfuentes2/php-activerecord/pull/409">https://github.com/jpfuentes2/php-activerecord/pull/409</a>)</p>
<p>Here is the code:<br /><a class="external" href="https://github.com/funkjedi/php-activerecord/tree/feature-sqlsrv">https://github.com/funkjedi/php-activerecord/tree/feature-sqlsrv</a></p>
<p>Enjoy!</p> General: RE: so no microsoft sqlsrvhttp://www.phpactiverecord.org/boards/1/topics/2009?r=2010#message-20102014-05-24T19:24:43-04:00Ladislav Gallay
<p>Hi, I would also like to use microsoft sql (MSSQL). Can anyone help us or give us hint how to edit adapter file to get it work with MSSQL?</p>
<p>Thank you very much!</p> General: so no microsoft sqlsrvhttp://www.phpactiverecord.org/boards/1/topics/20092014-05-22T10:28:09-04:00Francesco Venturini
<p>Finally, there is no way to use microsoft sql server ?</p>