Flexigrid - delete.php is not working - help needed!!! |
[eluser]jikowhitewolf[/eluser]
I have been trying to get delete.php to work from http://sanderkorvemaker.nl/test/flexigrid/ again , but somehow it is not deleting from my table, even when i have enabled the sql runSQL to do the delete action. I read someone has the same problem at this post. http://ellislab.com/forums/viewthread/75326/P270/ post#280, that all they did is remove the trailing comma (,) but where is the trailing comma (,)? Code: <?
[eluser]cahva[/eluser]
Code: $json .= "total: $total,\n";
[eluser]jikowhitewolf[/eluser]
thank you so much, it works. but I also notice another thing. Code: $sql = "DELETE FROM `service_table` WHERE `id` IN ($items)"; if I change to ` to ': Code: $sql = "DELETE FROM 'service_table' WHERE 'id' IN ($items)"; Now I wish to make a update.php, from this delete.php Code: $sql = "UPDATE service_table SET granted=`1` WHERE `id` IN ($items)"; but it just does not work, is it because of the json? Or is there anything wrong with my UPDATE statement? In my update php, I want to update "granted" to true.
[eluser]jikowhitewolf[/eluser]
ok, my update.php works now. But the json is not working for the update.php. I am not familiar with json, can anyone help me on the json below? It is the same example from delete.php, I only change the $sql for updating the database. Code: $items = rtrim($_POST['items'],","); I do not receive the json success alert box such as this. query: 'UPDATE service_table SET granted='1' WHERE id IN 1', total: 3, So that is why I am guessing it is the json. is it?
[eluser]jikowhitewolf[/eluser]
first method, I try adding the error in ajax, and it prints out ParserError Code: error: function(XMLHttpRequest, textStatus, errorThrown) my second method, I use json_encode but it throw $sql and $total as undefined. Code: $json = ""; anyone has any idea of this?
[eluser]cahva[/eluser]
Do you use Firebug? If not, please do ![]()
[eluser]jikowhitewolf[/eluser]
Oh, it needs FireFox and Firebug. Thanks, I will check it out.
[eluser]jikowhitewolf[/eluser]
jqgrid looks really impressive, too bad it is quite expensive.
[eluser]phpserver[/eluser]
That's what i thought the first time but i soon learn't that you could actually use it and buy the license when you need it,its actually based on jquery which is free. |
Welcome Guest, Not a member yet? Register Sign In |