Is it possible to use a stored procedure that returns multiple result sets in json format and process them as part of one request using ajax calls in jquery? In other words, I have a stored procedure that returns several result sets that are to be used with a series of select boxes that are all being filtered by the same criteria.
If...
Hello
I'm curious, is this result set can be achieved with sql query?
Here is the table
item_id name availability
-----------------------------------
1 brush available
2 brush available
3 paint not available
4 paint available
here is the result
name available ...
I have 2 tables :products and :providers with has_and_belongs_to_many association.
I would like to do this
@list = Product.find(
:select => "id,title",
:include => {
:providers => {
:select => "id,title"
}
}
)
How can specify fields for included table?
Thx!
...
How do I use the datagrid.SelectedItem to select a row programmatically?
Do I first have to create a IEnumerable of DatagridRow objects and pass the matching row to this SelectedItem property or how do I do it?
EDIT:
I need to match the cell content of the first columns cell with a textbox.text first, before selecting the row.
...
EDIT:That was fast. The reason why I have this is because the table is a pivot table between 2 tables one has "id" as primary key and the other "type" primary key
Hello.
I want the following:
Find only find "id" where "type" is 1 AND 2 AND 3
This is not working:
SELECT * FROM `table` WHERE `type` = 1 AND `type` = 2 AND `type` = 3;
...
I was just wondering if that default READ COMMITTED isolation level somehow makes the select statement act different inside of a transaction than one that is not in a transaction, anybody knows ?
I am using MSSQL
...
I am trying to get a results that will show Uniuque "Reasons", the number of them there are, and the percentage of the total that they are. so far I have
SELECT DISTINCT Reason,
COUNT(Reason) AS Number,
CAST(COUNT(Reason) AS float) / CAST(COUNT(*) AS float) AS percentage
FROM DeletedClients
However as I have discovered...
iplist table (id, username, ip, created) - stores the distinct IP addresses of each user
I want to find all the usernames who ever had the same IP address as 'angryuser'
MySQL QUERY:
SELECT username,
ip
FROM `iplist`
WHERE ip IN (
SELECT ip
FROM iplist
...
Hallo,
I have this json:
{
"ROWCOUNT":5,
"COLUMNS":["ID","REGIONE"],
"DATA":{
"ID":[1,2,4,3,5],
"REGIONE":["Abruzzo","Campania","Emilia","Molise","Toscana"]
}
I want retrieve value from ID and REGIONE with jquery, to fill a select. I have tried this one:
for(var COLUMNS in data) {
jQuery.each(data[COLUMNS], ...
Hi,
I want to pull list of colors from model and put the color select list in the view.
Options have value as color code. I want to change the background color of options same as its value. Below are two ways I tried to do but it comes out that it changes color for whole select list but not for individual options with individual colors....
I have these tables: Stock, Unit, Location, Category, StockBalance
At StockBalance: there is StockID from Stock, UnitId from Unit, LocationID from Location
I save at StockBalance Table like following
StockBalanceID | StockID | UnitID | LocationID | BalanceQuantity
1 | 1 | 1 | 1 | 20
2 ...
Hi
I have a datatable with 4 columns A, B, C and D such that a particular combination of values for column A, B and C is unique in the datatable.
Objective: To find the value of column D, for a given combination of values for column A, B and C.
I guess looping over the set of data rows should do it. Is there a way to use Datatable.Sel...
Hi, I have got 3 tables with those columns below:
Topics:
[TopicID] [TopicName]
Messages:
[MessageID] [MessageText]
MessageTopicRelations
[EntryID] [MessageID] [TopicID]
messages can be about more than one topic. question is: given couple of topics, I need to get messages which are about ALL these topics and not the less, but t...
code is below:
<select name="merTransactionTypeId" class="cbox" multiple>
<!--
<option value="0" <%=request.getParameter("merTransactionTypeId")!=null?"0".equalsIgnoreCase(request.getParameter("merTransactionTypeId"))?"selected":"":""%>>All</option>
-->
<option value="2" <%=request.getParameter("merTransactionTypeId")!=null?"2...
Hai guys,
I ve tried a query and i dont know what is wrong with the select statement,when i execute this no records are returned...
It seems rollid=3 is the prob records with rollid 3 are not fetched,
select * from tbl_emp_personal_master where dEmp_id ='7'
dEmp_id is int
I even tried removing quotes from '7' to 7 it didnt help
...
Assuming I have a XML like so:
<a>
<b>
<i>data</i>
<ii>data</ii>
<iii>data</iii>
</b>
<b>
<i>data<i>
<ii>data<ii>
<iii>data</iii>
</b>
</a>
Using XPath, how would I select the above XML to create a structure like so:
<b>
<i>data</i>
<ii>data</ii>
</b>
<b>
<i>data<i>
<ii>data<ii>
...
Having trouble with some select statements.
I have 2 tables. sms_log and sms_messages.
sms_log :
id
message_id
user_id
sms_messages:
message_id
admin_id
message
date_sent
date_delivered
I want to get the sms_message data where sms_log.user_id = $id
How do i do it, im a bit stuck. Also, how will i access it through php, exactly t...
I'm porting a windows network application to linux and faced a timeout problem with select call on linux. The following function blocks for the entire timeout value and returns while I checked with a packet sniffer that client has already sent the data.
int recvTimeOutTCP( SOCKET socket, long sec, long usec )
{
struct timeval timeout;...
This is a little more complicated than the title makes it out to be, but here are the essential business rules:
There are three select menus on the
page, each filled with the same
options and values.
There will always be three select
menus.
There will always be the same number
of options/values in each select
menu.
Selecting a question...