I have a DataTable with results already pulled down from a back end.
I want to do a DataTable.Select(), but the criteria is based on a SUBSTRING of one of the columns.
Is there syntax to use in the Select() method that allows for substring of a column test, or do I have to do it the hard way -- scan each row.
...
I am using Django everyday now for three month and it is really great. Fast web application development.
I have still one thing that I cannot do exactly how I want to.
It is the SelectField and SelectMultiple Field.
I want to be able to put some args to an option of a Select.
I finally success with the optgroup :
class EquipmentField...
I am putting together a nice little database for adding values to options, all these are setup through a map (Has and Belongs to Many) table, because many options are pointing to a single value.
So I am trying to specify 3 option.ids and a single id in a value table - four integers to point to a single value. Three tables. And I am runn...
I have 2 tables, defined as such:
CREATE TABLE `product` (
`pid` SMALLINT( 5 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
`name` VARCHAR( 50 ) NOT NULL,
`description` TEXT,
`qty` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT '0',
`category` ENUM( '1', '2', '3', '4', '5', '6', '7', '8' ) NOT NULL DEFAULT '1',
`price` DECIMAL( 7, 2 ) UNSIGNE...
The cell that is editable contains either 0 or 1 (not Active or Inactive). How do I make it selected? I have tried something like below:
$('#isEditable).editable("post.php?type=myPost", {
data : " {'0':'Inactive','1':'Active','selected':'"+<< put value of the clicked on cell here >>+"'}",
type : 'select'
});
Currently Inac...
Hello all,
I currently have a large table in MySQL with several fields. I am currently attempting to allow the user to filter by each field, via Select Boxes.
I have 4 fields: School, Division and State.
I have no problem, using PHP, on how to filter based on which option the user selects in the select box.
For example, if these 3 a...
Hi, I want to return the date and ID for the latest added record in on of our tables.
can anyone suggest right query for that plz. We are using sqlServer
SELECT [BGArx_ID], [BGArx_PUBLISHED_DATE]
FROM TECH_ARTICLES
WHERE [BGArx_PUBLISHED_DATE] = ???
...
hi There,
I can't get on the right track with this, any help would be appreciated
I have one table
+---+----------+---------+-----------+
|id | match_id | team_id | player_id |
+---+----------+---------+-----------+
| 1 | 9 | 10 | 5 |
| 2 | 9 | 10 | 7 |
| 3 | 9 | 10 | 9 |
| 4...
Sorry, I should have explained better: I have a $string and I want 'table' to be ordered by the number of times each value under 'word' column appears in that $string.
for that i need a query like:
'SELECT * FROM table WHERE $string
LIKE CONCAT("%",LOWER(word),"%")...
to find the words, then I would like to order them by appearance s...
I'm certain this is a simple solution, but had no luck pinning down the right approach (just getting started with jQuery). So, here's the question:
I have this HTML form:
<form id="callSelect" class="full" method="post" action="">
<select name="Single">
<option value="/var-a/">Var A</option>
<option value="/var-b/">Var B</opt...
Hi everyone!
I'm using Python and its MySQLdb module,
is it possible to do a "selectmany"-like from a tuple/dictionary/list in the condition
something like this:
cursor.executemany("""SELECT * FROM customers WHERE name= %(name)s""",[d.__dict__ for d in data])
selected_rows = cursor.fecthall()
doing a delete/update/insert works fin...
I know how to use group_concat with Sqlite, to do the following:
id - f1 - f2 - f3
1 - 1 - a - NULL
2 - 1 - b - NULL
3 - 2 - c - NULL
4 - 2 - d - NULL
select id, f1, group_concat(f2), f3
from table
group by f1
result:
2 - 1 - a,b - NULL
4 - 2 - c,d - NULL
as you can see, the ID's 1 and 3 are dropped, which is the ...
Hello Folks,
I have an adress table and I need to take the near number. For example if I´m entenring the number 256 in this case I´ll take 257 because:
254<--256->257
Somebody knows the solution.
Thanks and sorry for my bad English.
...
Given a table that looks like this:
sensor_id | time | voltage
-----------+------------------------+------------
12292 | 2009-12-01 00:50:04-07 | 2270
12282 | 2009-12-01 00:50:04-07 | 93774
12192 | 2009-12-01 00:50:04-07 | 9386
12609 | 2009-12-01 00:50:05-07 | 0
125...
select new FeedResource
{
Title = (string)details.Element("title"),
Host = (string)details.Element("link"),
Description = (string)details.Element("description"),
PublishedOn = (DateTime?)details.Element("pubDate"),
Generator = (string)details.Element("generator"),
Language = (string)details.Element("language")
...
Like what this page does.
...
is there any way i can trap html select events and can prevent the html select dropdown to open (disabling html select is ruled out)
...
hi I need to get all the values selected in a drop down box.Please see the example.
<html>
<head>
<script>
function getSelected()
{
alert(document.myform.mytextarea.value);
return false;
}
</script>
<title></title>
</head>
<body>
<form name=myform>
<select id=mytextarea size=3 multiple>
<option id=one value=one> one </option>
<option id...
A continuation of the previous question:
http://stackoverflow.com/questions/1905534/multiple-select
Is there a way to get the selected values in jsp(server side) ?
...
I thought this would be simple but obviously not!
Basically, I have a date and want to do a 'between' on two date columns like this:
myDataTable.Select(myDate & " between (StartDate and EndDate)")
Where StartDate and EndDate are date columns that do exist in the DataTable.
Any ideas?
...