Maheshwaran
-
Posts
9 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by Maheshwaran
-
-
On 8/11/2019 at 1:06 AM, Maheshwaran said:
I trying to update table where the data is coming from PHP.
Here the submit button and table are in different frame.
I have attached example code.
can you please help me to update table when click submit button?
Thanks,
Maheshwaran B
frame.html 199 B · 0 downloads frame_a.html 790 B · 0 downloads frame_b.html 2.29 kB · 0 downloads head.html 323 B · 0 downloads tmp.php 450 B · 1 download
-
Hi All,
Can you please give some coments
-
I trying to update table where the data is coming from PHP.
Here the submit button and table are in different frame.
I have attached example code.
can you please help me to update table when click submit button?
Thanks,
Maheshwaran B
-
Hi,
I am trying to searching order of string match in PHP. I tried "preg_match_all" and it's works some case and not someother case.
<?php
$sd = "2:Inst:(Inp:low:():high:(UnDri)),.(Inp:low:(concat():high:(UnDriven)),.(Inp:low:((((1))((1)))):high:((Constant))),."; // this should not match..
$sd = "2:Inst:(Inp:low:():high:(UnDri)),.(Inp:low:(():high:(UnDriven)),.(Inp:low:((concat((1))((1)))):high:((Constant))),."; // This should match
$tu = "(\binst\b)(,)(\blow\b)(.*)(\bconcat\b)(.*)(\bhigh\b)(.*)(\b(Constant)\b)";
if (preg_match_all("/$tu/i",$sd,$out,PREG_SET_ORDER)) {
echo "GUI : $sd\n";
} else {
}
?>
Thanks,
Maheshwaran B
-
Hi ,
Do you have sample example? I tried and I am not able to get sample example?
SQLIte does not have if statements. It also does not have an information_schema database. It seems like you found something that works in MySQL and you're assuming that it's also going to work in any other database, and that's not true.
It looks like you need to use the table_info pragma to get information about a table, which will return one record per column in the table. Look through those results to see if the column exists and then alter the table if not.
-
-
-
Hi,
I am getting following error when I try to add new column if the column not present.
can you please point me the error?
my $driver = "SQLite";
my $database = "tcc.db";
my $dsn = "DBI:$driver:dbname=$database";
my $userid = "";
my $password = "";
my $dbh = DBI->connect($dsn, $userid, $password, { RaiseError => 1 }) or die $DBI::errstr;my $stmt = qq(CREATE TABLE ddc
(reg_name TEXT PRIMARY KEY UNIQUE NOT NULL
););my $p1 = "Col1";
$rv = $dbh->do(" IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = ddc AND COLUMN_NAME = $p) BEGIN ALTER TABLE ddc ADD $p END") or die $DBI::err;
DBD::SQLite::db do failed: near "IF": syntax error
DataList update from jquery
in JavaScript
Posted
My idea is change the datalist based on Textbox.
# when textbox is empty, I want to display "initial,always"
# when textbox is select "initial or awlays" and datalist should show "LHS,RHS".
# again the textbox is empty, I want to show "initial,always".
Here the second scenario is showing only "initial" and when Textbox empty it showing "initial,always,LHS,RHS".
can you please give me some hint?
<!DOCTYPE HTML>
<html>
<head>
<title>
JQuery | Set value of input text.
</title>
<script src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js">
</script>
</head>
<body style="text-align: center;">
<input id="input" list="anrede" />
<datalist id="anrede">
</datalist>
<br>
<br>
<script>
var mycars = new Array();
var block = new Array();
mycars[0] = 'initial';
mycars[1] = 'always';
block[0] = 'LHS';
block[1] = 'RHS';
var options = '';
$("#input").click(function(event) {
$('#anrede').empty();
var option = '';
if ($('#input').val()=='') {
for(var i = 0; i < mycars.length; i++)
options += '<option value="'+mycars+'" />';
$('#anrede').append(options);
} else if ($('#input').val()=='initial') {
for(var ii = 0; ii < block.length; ii++) {
options += '<option value="'+block[ii]+'" />';
$('#anrede').append(options);
}
}
});
</script>
</body>
</html>