Bonjour,

je développe une application avec sencha touch, je cherche a modifier des éléments présents dans une base de données:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Ext.define('Client', 
		{
			extend: 'Ext.data.Model',
			config: 
			{
				fields: 
				[
					{name: 'code', type: 'string'}
				]
			}
		});
 
		var DataStore = new Ext.data.Store(
		{
			model: 'Client', 
			proxy: 
			{
				type: 'rest',
				url: 'serv/modifClient.php',             
				actionMethods: 
				{
					read: 'POST'
				},
				extraParams: 
				{
					id: this.idClient,
				},
				reader: 
				{
					type: 'json',
					root: 'result',
				}
			},
				autosave: false,
				// autoload: true,
 
		});
et mon PHP:

Code php : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
 
try
{
	$bdd = new PDO('mysql:host=localhost;dbname=rendezvous', 'root', '');							
}
catch (Exception $e)
{
	die('Erreur : ' . $e->getMessage());
}
echo "test";
 
$bdd->query("UPDATE client SET code = 'test' where Idclient ='".$_REQUEST['id']."'");
 
 
?>
.

mon problème est qu'il ne se passe rien : aucune ligne n'est mise à jours.
Ai-je oublier une étape ?


merci d'avance.