Jump to content

x[ مشكلةة ]x


Recommended Posts

السلامم عليكم .. يـ شباب , وشالحل؟

يقولي فالدي بق

dbPoll failed; no suck column: pName

الكود:
 

dbExec( HS, ' CREATE TABLE IF NOT EXISTS `HandlingS` ( pName,Han,Chan ) ' )

addEvent( 'SendH', true )
addEventHandler( 'SendH', root,
function(Han,Chan)
		local name = getPlayerName(source)
        local check = dbQuery( HS, ' SELECT * FROM `HandlingS` WHERE pName = ? ', name )
        local result = dbPoll( check, -1 )
        if ( type ( result ) == 'table' and #result == 0 ) then 
            dbExec( HS,' INSERT INTO `HandlingS` VALUES(?,?,?) ', pName, Han, Chan )
			outputChatBox( '* #FFFF00VIP System : #FFFFFF تمم الإرسال بنجاح ، الرجاء الإنتظار !', source, 0, 0, 0, true )
		refresh()
		end
end )

 

Edited by CLoz
Link to comment
43 minutes ago, Abdul KariM said:

جرب احذف القاعدة 

تمام , حذفتها وضفت قاعده جديدة وزبطت

لكن وش المشكلة هنا

يجبلي فالقريد ليست

الرو الثاني والثالث

لكن رو حق إسم اللاعب م يجيبه !

الكود:

-- Server
function refresh()
setTimer( function( )
      
    local check = dbQuery( XD, ' SELECT * FROM `Hss` ' )
      
        local results = dbPoll( check, -1 )
      
            if ( type ( results ) == 'table' and #results == 0 or not results ) then triggerClientEvent( root, 'rList', root ) return end
      
        triggerClientEvent( root, 'rTable', root, results )
      
    end, 500, 1 )
  
end
addEvent( 'refresh', true )

addEventHandler( 'refresh', root, refresh )


addEvent( 'SendH', true )

addEventHandler( 'SendH', root,
  
function(Han,Chan)
    
		name = getPlayerName(source)
    
        local check = dbQuery( XD, ' SELECT * FROM `Hss` WHERE Han = ? AND Chan = ? ',Han , Chan )
    
        local result = dbPoll( check, -1 )
    
        if ( type ( result ) == 'table' and #result == 0 ) then 
      
            dbExec( XD,' INSERT INTO `Hss` VALUES(?,?,?) ',name, Han, Chan )
      
            outputChatBox( '* #FFFF00VIP System : #FFFFFF تمم الإرسال بنجاح ، الرجاء الإنتظار !', source, 0, 0, 0, true )
      
        refresh()
      
        end
    
end )
-- Client:
addEvent( 'rTable', true )

 addEventHandler( 'rTable', root,
  
     function( table )
    
    
         guiGridListClear(GridList_)
    
         for f,_  in ipairs( table ) do
      
             local row2 = guiGridListAddRow( GridList_ )
             local playerN = guiGridListSetItemText( GridList_, row2, 1,table[f].name, false, false )
             local playerA = guiGridListSetItemText( GridList_, row2, 2,table[f].Han, false, false )
             local playerC = guiGridListSetItemText( GridList_, row2, 3,table[f].Chan, false, false )
             guiGridListSetItemColor(GridList_, row2, 1, 0, 255, 0)
             guiGridListSetItemColor(GridList_, row2, 2, 255, 255, 0)
             guiGridListSetItemColor(GridList_, row2, 3, 0, 0, 255)
         end
    
     end 
  
 )

 

Edited by CLoz
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...