Page 1 of 1

HMGSCRIPT 0.33

Posted: Sat Jul 14, 2012 8:13 pm
by Roberto Lopez
Hi All,

In this release, a lot of support for MySql back-ends in AMP (standard web) servers. Thanks to Rathinagiri for his MySqlBrowse that served as a base for SqlBrowse.

SQLCONNECTION

Syntax:

SqlConnection( cHostName , cUser , cPassword , cDataBase )


Example:

oConn = new SqlConnection( 'localhost' , 'root' , 'pass' , 'test' )


------------------------------------------------------------------------------------------------

SQLEXEC

Syntax:

<nAffectedRows> = SqlExec ( oConnection , cSqlCommand )

Example:

oConn = new SqlConnection( 'localhost' , 'root' , 'pass' , 'test' )

nAffectedRows = SqlExec ( oConn , 'DELETE FROM TEST WHERE code=123' )


------------------------------------------------------------------------------------------------

SQLBROWSE

Syntax:


SqlBrowse( oParent , nRow , nCol , nWidth , nHeight , oConnection , cQuery, nInnerWidth )


Methods:


- getSelectedRows()
- getRowCount()
- getCell(nRow,nCount)
- select()
- unSelect()
- refresh()
- getId()
- getSelectedRowCount()


Example:

oForm = new Form( "SQLBrowse Test", 590 , 480 );

oConn = new SqlConnection( 'localhost' , 'root', 'vertrigo' , 'test' );

oBrowse = new SqlBrowse( oForm , 050 , 050 , 510 , 340 , oConn ,
'select * from country', 493 );


------------------------------------------------------------------------------------------------

SQLQUERY

Syntax:

SqlQuery( oConnection , cQuery )


Description:


Returns an array containing the query result.


Example:


oConn = new SqlConnection( 'localhost' , 'root', 'vertrigo' , 'test' );

aQuery = SqlQuery( oConn , 'select * from country' );

for ( i = 0 ; i < aQuery.length ; i++ )
{
field1 = aQuery [0];
field2 = aQuery [1];
field3 = aQuery [2];

alert( field1 + ' ' + field2 + ' ' + field3 );
}

------------------------------------------------------------------------------------------------



https://sourceforge.net/projects/hmgscript/

Enjoy!

Re: HMGSCRIPT 0.33

Posted: Sat Jul 14, 2012 9:40 pm
by esgici
Thanks :D

Best regards

--

Esgici

Re: HMGSCRIPT 0.33

Posted: Sat Jul 14, 2012 10:27 pm
by salamandra
Thanks Roberto :P

Nice job ;)

[]´s Salamandra

Re: HMGSCRIPT 0.33

Posted: Sun Jul 15, 2012 2:49 am
by Rathinagiri
I can't believe it happening Roberto. You are the one man!