Hi,
I have a table with the following columns
id, teamA_id, teamB_id
Will it be possible to a SELECT statement that gives both teamA_id and teamB_id in the same column?
Is there any way of creating a combo box (<select>) with a size of 1? All the examples I can find allow for multiple selects but with a number of options visible at any one time. If this cannot be accomplished with bog standard HTML is it possible in a JS library such as JQuery?
Hello,
I have few columns in my DataGridView, and there is data in my rows,
I saw few solutions in here, but I can not combine them!
simply a way to right-click on a row it select the whole row and show a menu with an option to delete the row and when the option selected it will delete the row
I made few attempts but none is working and it looks messy
any suggestions?
cheers
Hello,
i got a MySql DB.
There is a table with products and orders.
Structure:
Products: product_id, name, manufacturers_id
Orders: orders_id, product_id, quantitiy
Now I want to get all orders (show only products where product id=1).
I tried:
SELECT
orders.orders_id,
orders.product_od
FROM products, orders
WHERE products.manufacturers_id = 1
GROUP BY orders_id
ORDER BY orders_id
But this doesnt work
Hey,
I'm looking at the nhibernate interceptor. It seems to be able to intercept save, update and delete queries but is there anyway I can intercept a select query.
The problem I have is that I automatically want to append some additional sql filters to the executing sql statement in certain cases.
Any thoughts
Thanks
Mat
I have the following code and it should return just one value (id) from mysql table. The following code doesnt work. How can I output it without creating arrays and all this stuff, just a simple output of one value.
$query = "SELECT id FROM users_entity WHERE username = 'Admin' ";
$result = map_query($query);
echo $result;
Hi,
I was wondering if there is anyway of disabling the select all options on the top corner of the WPF DataGrid....this only seems to occur when I add a UserControl to a fixeddocument in WPF.
Thanks in advance,
U.
Hey guys,
Using jQuery, the following is not working in FF, but it is in IE
$(this).focus().select();
I looked around for this and found that you could use a timeout to get around this, but that is not something I want to do if I can avoid it. Does anyone know another way to do this and have it work in FF?
Metropolis
Hi, how can I "copy" the selected option between two s that have the same options using prototype ? I tried getting the selected option from the "master" combo using
function getSelectedArea() {
$$('#areacont1 option').find(function(ele){return !!ele.selected})
}
which returns null
And setting the second combo using
var c2ROptions = $$('select#areacont2 option')
c2ROptions[getSelectedArea()].selected = true
That obviously doesn't work because the function returns null.
Any hints?
Thanks.
hello,
i want to do a select multiple double side
like this : http://www.senamion.com/blog/jmultiselect2side.html (Demo2)
but i don't know how i can retrieve my data when i click submit button..?
I have the following simple SQL statment
SELECT id, name, value_name, value_id
FROM table
GROUP BY id
ORDER BY value_id DESC
when grouping I would like to get the value_name and value_id of the tuple where the value_id is the biggest. The way it is i am getting the smallest value. For example
1, name1, valuename, 3 (where i know that there is a value_id of 5)
Can you please help?
I need to update some rows of the tables and then display these rows. Is there a way to do this with one single query and avoid this 2 query ? :
UPDATE table SET foo=1 WHERE boo=2
SELECT * from table WHERE ( foo=1 ) AND ( boo=2 )
Suppose that I have a Table Symbols(Symbol, Value) and a Table SymbolValues (Symbol, Value) which contains a list of values for the symbol.
How to choose maximum values fromt he SymbolValues table and insert into Symbols table.
For Example, The SymbolValues Table has following values
A 1
A 2
A 3
B 6
B 7
Then only A 3 and B 7 should be inserted in the Symbols table.
Is this possible using insert into select statement.
Thanks
I need to be able to change the background-image property of a SELECT drop-down using JavaScript/CSS. We have been able to accomplish this in Firefox, but it doesn't appear to be supported at all in IE.
From what I've read, IE won't support this. But I'm wondering if there's anything else I could try. Does anyone here have any recommendations?
Tried to find the answer, but still couldn't.. The table is as follows:
id, keyword, value
1 display 15.6
1 harddrive 320
1 ram 3
So what i need is something like this.. Select an id from this table where (keyword="display" and value="15.6") AND (keyword="harddrive" and value="320")
There's also a possibility that there will be 3 or 4 such keyword conditions which should result into returning one id (one row)
It seems there's something to deal with UNION but i didn't use it before so i can't figure it out
Thanks in advance
I have three tables, Customers, Sales and Products.
Sales links a CustomerID with a ProductID and has a SalesPrice.
select Products.Category, AVG(SalePrice) from Sales
inner join Products on Products.ProductID = Sales.ProductID
group by Products.Category
This lets me see the average price for all sales by category. However, I only want to include customers that have more than 3 sales records or more in the DB.
I am not sure the best way, or any way, to go about this. Ideas?
I have the following table :
alertID inspectorID datelive dateread
1 none 2012-11-06 10:36:03.350 NULL
2 none 2012-11-06 10:36:25.043 NULL
3 none 2012-11-06 10:36:42.433 NULL
1 31030 2012-11-06 10:37:19.193 2012-06-11 10:34:47.000
I want to select the alerts that dont have the inspectors ID against it AND where the alert ID doenst match the one that has the inspectorID against it, ie inspector has read alert 1 so i only want it to return alerts 2 & 3
Am using Classic ASP and MS-SQL
Cheers
MySQL keeps saying my syntax is incorrect.
I want to do this:
DELIMITER $$
DROP PROCEDURE IF EXISTS `myprocedure` $$
CREATE DEFINER=`db`@`%` PROCEDURE `myprocedure`(
var_name varchar(10)
)
BEGIN
/* syntax errors below */
DECLARE countTemp integer;
SET countTemp=(SELECT COUNT(Name) FROM mytable WHERE Name= var_name);
/* more stuff */
END $$
DELIMITER ;
What's the correct syntax?
I have a font resize function on my page which increases the font size via javascript for the entire page.
This works fine in most browsers except IE. When decreasing the font size after increasing it, the select boxes new height does not decrease, even though the font size is decreasing on it. Instead the smaller font appears to be padded with white space.
Any ideas as to what IE is doing here, and a work around?
Hi i have to select the 2 lastest element for every topic
ex:
table: msg
id | topic_id
-----------
1 | 1
2 | 1
3 | 1
4 | 1
5 | 2
6 | 2
7 | 2
8 | 3
i want obtain these rows:
3 1
4 1
6 2
7 2
8 3
How can i do?
thanks
I have a form which includes select options with different items. Based on item selected, I need to show respective form on the same page.Does any one know jquery plugin for this or how aesthetically we can do this kind of requirement?
Hello,
in MySQL, I have table. One column has auto-increment. When I insert something
mysql_query('INSERT INTO `table` SET `column` = "data";');
Now, what I want is, without further queries, to get the value of the auto-incrementing column, maybe like this:
mysql_query('insertion = (INSERT INTO `table` SET `column` = "data");
SELECT `auto_incrementing_column` FROM `table`.insertion');
Please tell me how something like that is done. Thanks in advance!