select

Can a MySQL SELECT statement work without specifying column names?

How do I SELECT rows and return all the columns, instead of specifying individual column names? Can I also return only columns that match a specific criteria? (eg. col names beginning with an "_") ...

C# LINQ-to-SQL Multiple selects

Hello! I got this, its calling a SP in my MS SQL 2008 database: [Function(Name = "dbo.Content_GetContent")] [ResultType(typeof(Content_GetContentResult))] [ResultType(typeof(Content_GetContentImagesResult))] [ResultType(typeof(Content_GetContentBoxesResult))] [ResultType(typeof(Content_GetContentSearchWordsResult))] ...

Python MySQL - SELECTs work but not DELETEs?

Hey -- I'm new to Python and Python's MySQL adapter. I'm not sure if I'm missing something obvious here: db = MySQLdb.connect(# db details omitted) cursor = self.db.cursor() # WORKS cursor.execute("SELECT site_id FROM users WHERE username=%s", (username)) record = cursor.fetchone() # DOES NOT SEEM TO WORK cursor.execute("DELETE FROM ...

How to Handle Tcl Treeview Selections

Hello: I am using the following procedure to delete a record within a database that is displayed within a treeview widget (z1): set z1 [ttk::treeview .c1.t1 -columns {first last} -show headings] proc Dlt {} { global z1 z11 sqlite3 db test.db db eval { DELETE From t1 Where First_Name = $z11 and Last_Name = $z11 ...

How to catch the second select on <select > with jQuery?

The first click expands the <option>, the second click select one of them. How to catch the second click? ...

Set URL via selected jQuery tab

Further to this question - and using the same getUrlParam.js plugin. $(document).ready(function(){ var param = $(document).getUrlParam('tab'); $("#tabs").tabs(); $("#tabs").tabs('select', param); }); With this code I am able to control which tab loads on a given page e.g. blogs/?tab=tv loads the tab #tv on the /blogs/ page. However ...

powershell basic syntax question for select

Background: Here the goal is to do some basic commands in powershell using select-string. For some reason, there are certain things that are not working as expected. Assume the following: $vfilter = 'c:/foo/bar/files/*.htm'; Select-String -path $vfilter -pattern ".*DOCTY.*" | sort LineNumber | where-object { $_...

SQL Select Entire Row by Distinct Columns

Hello, I need an sql statement which will allow me to select an entire row from oracle database, but by distinct columns. Here is a simplified database: Project_Num Title Category 0 Project 1 Admin 0 Project 1 Development 1 Project 2 Admin 2 Pro...

JavaScript: get value of dropdown

I have 3 HTML combo/drop down boxes. All of them have a distinct name and id. On a particular event I want to get the value of all three of them. Can any one give me a code snippet for that? ...

Dojo - Filtering Select - How to add a blank option '-' that allows submission

Hello, Been trying to fix this for a while now. I have loads of Dojo Filtering Select elements in my form. I need them to have a blank option which should be selected by default. Here is an example (of a normal <select> structure) that I want to emulate: <select> <option value="">-</option> <option value="foo">Bar</option> </s...

ajax :populating 2 drop down boxes via ajax using value of the third one

i hava a html page with 3 drop down boxes. When i change one of the box the value in that box is sent to server and the server shold returns the values of the other 2. How will i populate the othere 2 drop down boxes depending on the value of first one. All valuses are obtained frm server side. EX dd1 , dd2, dd3 where dd= drop down box...

SQL query need to get user where program column includes certain program

Let me try to explain this to the best of my ability: I have a table in which there is a userID column and a program column (along with other columns of non importance). I need to find the users within this table that have multiple instances within this table where that user has a program of X associated with it. Can anyone help me ple...

SQL query need to get certain counts of data item

here is the whole picture. There is a table (table programparticipants) that stores all participants of all programs, there is another table (table programs) that stores all the programs. What I need to accomplish is the following: Acquire the programs where a user has attended more than one program (done) Acquire the other programs (f...

Select mysql query between date?

How to select data from mysql table past date to current date? For example, Select data from 1 january 2009 until current date ?? My column "datetime" is in datetime date type. Please help, thanks Edit: If let say i want to get day per day data from 1 january 2009, how to write the query? Use count and between function? ...

how to select multiple lines in iphone .plist file?

Hi, In my Iphone application ,i am using .plist file having so many data. I want to select multiple lines in .plist file. Please give any key combination by using which i can select multiple lines in .plist file and also use it for my own purpose. Thanks, Mishal Shah ...

SQL: Select * from

i hava a query of the following form select * from tablename where id= $var now sometimes i need to select a recod with a particular id ,and sometimes i need to select recore with any id so i intent to something of follwoing form $v = $_GET['id']; if($v== -1) $var = '*' //here i want to select all recods else $var = $v //sele...

Use SELECT AVG with parameters "SELECT AVG(@parameter)" SQL!!

I'm working with a table of float values, but I enter the column by parameter SELECT AVG(@var) AS Aver FROM ListVal When I enter the column name (the parameter) I recieve an error: That the datatype nvarchar is not valid for the avg operator. But all the columns are float. Help!!! please ...

replace id with name in collection_select

In my application i have a collection_select on my members table, the members table only contains id's. It has an user_id, project_id, role_id, and so on. I want show the members name in the collection_select. But i only have the user_id in the members table, how can i show the names from the user table as options? <%= collection_selec...

Selectable grid row in asp.net with C# like istockphoto

Hi, I'm building a website for a friend and would like to know how hard is it to code a selectable menu like http://www.istockphoto.com/stock-photo-8544108-beauty-with-hat.php - the one on the right where you choose picture size. I would like to create something similar in asp.net c#. I searched for 3 hours on google and couldn't find ...

MySQL: How to get user with most wins?

I have a table with the following fields: id, opp1, opp2, opp1_votes, opp2_votes. If one of the opps have more votes than another so we consider that he won. How can I get opp with most wins from this table? ...