Mysql deleting and editing options - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Mysql deleting and editing options (
/showthread.php?tid=598767)
Mysql deleting and editing options -
Aa12 - 16.01.2016
I just started learning mysql
http://i.imgur.com/Gfs0rYX.png
How do I delete line? For example line with id 23?
And why I have edit and delete options in this table :
http://i.imgur.com/ec3R2eS.png but dont have them in my first table(first picture). Im pretty sure I created both tables the same way
Re: Mysql deleting and editing options -
iKarim - 16.01.2016
You don't need buttons to delete or edit data from MySQL.
Just use the queries: Delete, Update and Insert Into.
Example:
PHP код:
DELETE * FROM `table` WHERE `id` = 23;
PHP код:
UPDATE `table` SET `IntCol` = 0 , `StrCol` = 'Test';
Re: Mysql deleting and editing options -
Vince - 16.01.2016
You only have the edit options if the table has a primary key. If the table does not have a primary key then a row cannot be uniquely
identified and those options won't work.
Re: Mysql deleting and editing options -
Aa12 - 16.01.2016
Quote:
Originally Posted by Vince
You only have the edit options if the table has a primary key. If the table does not have a primary key then a row cannot be uniquely identified and those options won't work.
|
Thank you