HMGSCRIPT R42

Moderator: Rathinagiri

User avatar
serge_girard
Posts: 3222
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: HMGSCRIPT R42

Post by serge_girard »

Jair,

Cannot test while missing themes/desktop.css and lib/hmgscript.js

Serge
There's nothing you can do that can't be done...
User avatar
jairpinho
Posts: 420
Joined: Mon Jul 18, 2011 5:36 pm
Location: Rio Grande do Sul - Brasil
Contact:

Re: HMGSCRIPT R42

Post by jairpinho »

serge_girard wrote: Tue Feb 19, 2019 10:09 am Jair,

Cannot test while missing themes/desktop.css and lib/hmgscript.js

Serge
I used the hmgscript42 folder, use this folder as reference and add the uploaded files
Jair Pinho
HMG ALTA REVOLUÇÃO xBASE
HMG xBASE REVOLUTION HIGH
http://www.hmgforum.com.br
User avatar
serge_girard
Posts: 3222
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: HMGSCRIPT R42

Post by serge_girard »

Jair,

Missing /php/mysql.php AND themes/desktop.css !

Serge
There's nothing you can do that can't be done...
User avatar
jairpinho
Posts: 420
Joined: Mon Jul 18, 2011 5:36 pm
Location: Rio Grande do Sul - Brasil
Contact:

Re: HMGSCRIPT R42

Post by jairpinho »

serge_girard wrote: Tue Feb 19, 2019 3:43 pm Jair,

Missing /php/mysql.php AND themes/desktop.css !



Serge
So I need an example with mariadb I do not use php, how to connect to mysql with mariadb ?, can I create the php file manually and add in my application does it work or not?
Jair Pinho
HMG ALTA REVOLUÇÃO xBASE
HMG xBASE REVOLUTION HIGH
http://www.hmgforum.com.br
User avatar
serge_girard
Posts: 3222
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: HMGSCRIPT R42

Post by serge_girard »

Jair,

In function MySQLBrowse you use: xmlHttp.open( "POST" , "/php/mysql.php" , false ) ;
This PHP file will do all the work. You will have to create it yourself!

It will be something like this:

Code: Select all

<?php
		
	$db = mysqli_connect( '127.0.0.1', 'root', '');  // your parameters!!
	if( ! $db ) :
		die( mysql_error() )	;
	endif;

	if( ! mysqli_select_db($db, 'bk')):
		die( mysql_error() );
	endif;
	
	$query = mysqli_query( $db, "select * from " );  / your parameters!!
	if( !$query ) :
		die("error SQL");
	endif;
	
	$table = array();
	while( $row = mysqli_fetch_array( $query, MYSQLI_NUM ) ):
		$table[] = $row;
	endwhile;

	$string	= json_encode( $table );
	mysqli_free_result( $query );
	mysqli_close($db);

	echo $string;
?>
Serge
There's nothing you can do that can't be done...
Post Reply