deletet whit editor
deletet whit editor
rrzavaleta
Posts: 78Questions: 52Answers: 2
in Editor
tengo un problema para borrar desde el editor. normalmente se elimina una registro udando un campo "id". en caso de que quiera usar una sentencia mas grande como por ejemplo :
DELETE from ING_VALOR_CAMPO
WHERE ID_ASEGURADORA='4' AND ID_CAMPO='38' AND VAL_CAMPO='CAM' AND DESC_VALOR='DESC' AND SECUENCIA='2' "
How I can interpret this in the datatable editor?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Typically Editor is only required to perform a simple DELETE for each row to be deleted. If you need to add additional
where
parameters you could use thewhere()
method of the Editor class.A final option would be to use the
sql()
method to directly trigger the query yourself - that way you have complete control over it.Allan
will have an example that I can use displayed using the where () method of the class Editor
I'm afraid I don't understand - sorry. Are you asking for an example showing the use of
where()
? Its simply a case of adding->where( 'myColumn', 'myValue', '=' )
to your Editor code.Allan