Jump to content

جداول


Recommended Posts

5 hours ago, #_iMr,[E]coo said:

setAccountData ( getAccount ( 'Ra7-TnGLD' ) , 'ExampleJson' , toJSON  ( { 'Hhh' , 'hohoho' , 'neahahaha' } ) )

local Data = getAccountData ( getAccount ( 'Ra7-TnGLD' ) , 'ExampleJson' ) 
if ( fromJSON ( Data ) [ 1 ] == 'Hhh' ) then 
  iprint ( 'yup' )
end 

 

شكرا لكن طريقة حفظ الجداول تختلف

Link to comment
19 minutes ago, Abdul KariM said:

ترا كذا بتزيد من مساحة القاعدة خصوصا لو كان التيبل فيه معلومات كثيرة

for _,k in ipairs(Table) do
executeSQLQuery ( "INSERT INTO `Save Table System` ( Name,Col 1 ) VALUES(?,?,?,?)","Table",toJSON({k[1],k[2],k[3]} )
  end

وكذا؟

Link to comment
theTable = {	}

executeSQLQuery ( "INSERT INTO `Table_System` ( myTable ) VALUES(?)", toJSON ( theTable ) )

	function getTableFromSql (	)
	  
	local aRow = executeSQLQuery( "SELECT myTable FROM `Table_System`" )

	if ( type ( aRow ) == "table" and #aRow == 0 ) or not aRow then return end	
	
		return fromJSON ( aRow [ 1 ] [ "myTable" ] )
	end

ذا شي بسيط وانت طبق على الي عندك

Edited by Abdul KariM
Link to comment
5 hours ago, Abdul KariM said:

theTable = {	}

executeSQLQuery ( "INSERT INTO `Table_System` ( myTable ) VALUES(?)", toJSON ( theTable ) )

	function getTableFromSql (	)
	  
	local aRow = executeSQLQuery( "SELECT myTable FROM `Table_System`" )

	if ( type ( aRow ) == "table" and #aRow == 0 ) or not aRow then return end	
	
		return fromJSON ( aRow [ 1 ] [ "myTable" ] )
	end

ذا شي بسيط وانت طبق على الي عندك

شكرا

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...