import java.text.MessageFormat;
-import net.sourceforge.phpdt.sql.PHPEclipseSQLPlugin;
-import net.sourceforge.phpdt.sql.sql.TableRow;
-import net.sourceforge.phpdt.sql.view.PHPSourceConsole;
-import net.sourceforge.phpdt.sql.view.tableview.TableAdapter;
-
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
+import net.sourceforge.phpdt.sql.PHPEclipseSQLPlugin;
+import net.sourceforge.phpdt.sql.sql.TableRow;
+import net.sourceforge.phpdt.sql.view.PHPSourceConsole;
+import net.sourceforge.phpdt.sql.view.tableview.TableAdapter;
+
public class PHPDeleteRowPage extends WizardPage implements SQLPage {
TableRow row;
String[] columnNames;
}
public void createControl(Composite parent) {
- if (DEBUG) {
- System.out.println("page create control");
- }
+ System.out.println("page create control");
fStore = PHPEclipseSQLPlugin.getDefault().getPreferenceStore();
Composite container = new Composite(parent, SWT.NULL);
GridLayout layout = new GridLayout();
if (row == null) {
System.out.println("Row is null");
}
-
if (row.getColumnNames() == null) {
System.out.println("Columns are null");
}
// whereClause.deleteCharAt(whereClause.length() - 1);
// whereClause.deleteCharAt(whereClause.length() - 1);
// }
-
-
- String[] arguments = { row.getTable(), whereClause.toString() };
+
+ String[] arguments = { row.getTable(), whereClause.toString()};
MessageFormat form = new MessageFormat(fStore.getString("phpeclipse.sql.delete.template"));
String query = form.format(arguments);
-
-// String query = "$results = mysql_query(\"DELETE FROM " + row.getTable();
-// if (numSelected > 0) {
-// query += " WHERE " + whereClause.toString() + "\");";
-// } else {
-// query += "\");";
-// }
+
+ // String query = "$results = mysql_query(\"DELETE FROM " + row.getTable();
+ // if (numSelected > 0) {
+ // query += " WHERE " + whereClause.toString() + "\");";
+ // } else {
+ // query += "\");";
+ // }
if (numSelected > 0) {
setMessage("");