Assalamu'laiakum.
I'm Fahmi.
When i want to update and delete data, should i have to advanced sql ? or just make the run server action ?
I'm newbie here, so plese help me haha.
Thanks
fahmi fachrurozi wrote:
Hi Fahmi,
Both ways are fine, If you want to delete or update more than one record at a time based on your condition than Advance Sql can be use. Otherwise you can use Sever action to delete or update single record at a time.
Sachin
Sachin Mahawar wrote:
The possibility record that could be deleted or updated in Profile Entity are Username, Photo, And Password. So i have to use Advanced SQL or just RunServer Action ?
If you need to update some/all attributes of a single entity record (like changing the Username of a Profile entity record you suggest) then you will most likely want to use the UpdateProfile Entity Action to do it.
The same if you have the Id of the record you want to delete, just use the DeleteProfile Entity Action.
What Sachin was mentioning is if you need to update/delete multiple records/rows based on some condition (e.g. delete all Log entities whose Timestamp attribute is older than two weeks) then you're probably better off with using a SQL statement.
Jorge Martins wrote:
Allright man, i got it. Thanks :)
I am agree with Sachin.For delete you should look into entity. What type of delete rule you have applied.
-HM-
Hitesh Maran wrote:
Ok Hitesh, thanks
Fahmi,
If one of the answers solves your issue please mark it as solution. If none does but you managed to figure out how to solve it, please share with the community as well and mark it as the solution, this way you'll help others that may have the same doubt.
Thanks!