HMGSCRIPT 0.33

HMG announcements; Latest HMG-related news, releases, fixes and updates.

Moderator: Rathinagiri

Post Reply
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

HMGSCRIPT 0.33

Post 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!
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: HMGSCRIPT 0.33

Post by esgici »

Thanks :D

Best regards

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
salamandra
Posts: 311
Joined: Thu Jul 31, 2008 8:33 pm
DBs Used: DBF, MySQL, SQL
Location: Brazil

Re: HMGSCRIPT 0.33

Post by salamandra »

Thanks Roberto :P

Nice job ;)

[]´s Salamandra
There is one time in which is crucial awakening. That time is now. ( Buddha )
User avatar
Rathinagiri
Posts: 5481
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: HMGSCRIPT 0.33

Post by Rathinagiri »

I can't believe it happening Roberto. You are the one man!
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
Post Reply