Adham Posted March 4, 2017 Share Posted March 4, 2017 السلأم عليكم ورحمه الله وبركاته اليوم سويت سقل طريقه انشاء القاعده : executeSQLQuery( "CREATE TABLE IF NOT EXISTS Systems (text,CardType,Adham)" ) وسويت يوم لما يضعط علي زر يسوي DROP executeSQLQuery("DROP TABLE Systems" ) وم يتحذف شي الدي بق : Database query failed: no such table:Systems Link to comment
Adham Posted March 4, 2017 Author Share Posted March 4, 2017 3 minutes ago, Default said: اطرح الكود حق حذف القاعدة بعته لك بالخاص Link to comment
Master_MTA Posted March 5, 2017 Share Posted March 5, 2017 10 hours ago, Deativated said: بعته لك بالخاص يا غالي ان كنت تبي بالخاص لا تطرح هنا كلمه بالخاص من اول +_+ الله المستعان Link to comment
Adham Posted March 5, 2017 Author Share Posted March 5, 2017 (edited) شف اخ مستر مسوي لما يكتب في 3 ايديت يجي بالقريد لست الكتبو بالايديت ويتحفظ محاولتي : triggerServerEvent ( "Save", localPlayer ) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == Button ) then local Text = guiGetText ( edit1 ) local Tezt2 = guiGetText ( edit2 ) local Text3 = guiGetText ( edit3 ) if Text == "" or Tezt2 == "" or Text3 == "" then return end triggerServerEvent ( "onSend", localPlayer,Text,Tezt2,Text3 ) end end ) addEvent ( "Accept", true ) addEventHandler ( "Accept", root, function ( theList ) guiGridListClear(GUIEditor.gridlist[4]) for i, R in pairs(theList) do guiGridListSetItemText(GUIEditor.gridlist[4], row, 1, R["Text"], false, false) guiGridListSetItemText(GUIEditor.gridlist[4], row, 2, R["Tezt2"], false, false) guiGridListSetItemText(GUIEditor.gridlist[4], row, 3, R["Text3"], false, false) end end ) -- Server addEventHandler ("onResourceStart", resourceRoot, function () executeSQLQuery ("CREATE TABLE IF NOT EXISTS `ModsSystem` (Text,Tezt2,Text3)") end ) addEvent ( "Save", true ) addEventHandler ( "Save", root, function ( ) local result = executeSQLQuery ( "SELECT * FROM `ModsSystem` " ) if ( type ( result ) == "table" and #result == 0 ) or not result then triggerClientEvent ( client, "Accept", client, result ) end end ) addEvent ( "onSend", true ) addEventHandler ( "onSend", root, function ( Text,Tezt2,Text3 ) executeSQLQuery("INSERT INTO `ModsSystem` ( Text,Tezt2,Text3 ) VALUES ( ?, ?, ? )", tostring ( Text ), tostring ( Tezt2 ), tostring ( Text2 ) ) end ) ملحوظه: التريقر الأول في كود فتح الوحة Edited March 5, 2017 by Deativated Link to comment
Ahmed Ly Posted March 5, 2017 Share Posted March 5, 2017 riggerServerEvent ( "Save", localPlayer ) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == Button ) then local Text = guiGetText ( edit1 ) local Tezt2 = guiGetText ( edit2 ) local Text3 = guiGetText ( edit3 ) if Text == "" or Tezt2 == "" or Text3 == "" then return end triggerServerEvent ( "onSend", localPlayer,Text,Tezt2,Text3 ) end end ) addEvent ( "Accept", true ) addEventHandler ( "Accept", root, function (text1,text2,text3) row = guiGridListAddRow(GUIEditor.gridlist[4]) guiGridListSetItemText(GUIEditor.gridlist[4], row, 1,text1, false, false) guiGridListSetItemText(GUIEditor.gridlist[4], row, 2,text2, false, false) guiGridListSetItemText(GUIEditor.gridlist[4], row, 3,text3, false, false) end ) -- Server executeSQLQuery ("CREATE TABLE IF NOT EXISTS `ModsSystem` (Text,Tezt2,Text3)") addEvent ( "Save", true ) addEventHandler ( "Save", root, function ( ) local result = executeSQLQuery ( "SELECT * FROM `ModsSystem` " ) if ( type ( result ) == "table" and #result == 0 ) or not result then local text1 = result[1]["Text"] local text2 = result[1]["Tezt2"] local text3 = result[1]["Text3"] triggerClientEvent (source, "Accept", source, text1,text2,text3 ) end end ) addEvent ( "onSend", true ) addEventHandler ( "onSend", root, function ( Text,Tezt2,Text3 ) executeSQLQuery("INSERT INTO `ModsSystem` ( Text,Tezt2,Text3 ) VALUES ( ?, ?, ? )",Text,Tezt2,Text3) end ) Link to comment
Adham Posted March 5, 2017 Author Share Posted March 5, 2017 بخلص درس , وبجربه وبعطيك خبر . Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now