Say I have these tables:
people(id, name),
cars(person_id, car)
and this query:
SELECT c.car
FROM people as p, cars as c
WHERE c.person_id = p.id
AND p.id = 3
I want the c.car column to take its name fromthe name field in the people table, like this (invalid SQL, just to illustrate):
SELECT c.car AS(SELECT name FROM people WHERE id = 3)
How do I do that?
I have a bunch of dimension tables that have unique ID and Name fields. I need a T-SQL function that returns an ID when passed a table name and a value for the name field.
I'm guessing the query would build a little query then execute it? Performance isn't an issue since this is a one time ETL thing.
I have a form that is divided into two classes. Each class represents the widgets on part of the form. What is the best way to allow these classes to share data between each other and update each other.
Example:
Button in class A is clicked. Update text field in class C
I have the following code:
(function(jQuery){
jQuery.fn.timepicker = function(){
return this.each(function(){
jQuery(this).val("14:00");
});
};
})(jQuery);
Currently I invoke this function by the following code: $("#event_start_time").timepicker();
Where #event_start_time is the ID of an <input> field.
How can I invoke this code only when I click inside the text box?
Hi
I have a table with the following structure:
id int(11),
name varchar(250)
I have lots of records in the table but when I am trying to find a particluar record which has the following value on the name field:
Lorem ipsum d\'olor sit amet
The query is simply returning a blank recordset. I am not being able to figure out this weird behaviour, when my query is as simple as follows:
SELECT * FROM slot_games WHERE name='Lorem ipsum d\'olor sit amet'
Would appreciate your help please! Thanks in advance.
Hi,
I have a textbox in a gridview and a table "purchaseoreders". Now when the itemcode(field of the table) is given in the textbox, the others details have to bind.
Ideas..??
Please help.
Thank You
Pravi.
hi!
i'm new to membership. i have a table named contact, with a field, userId that must get its data fromthe membership users table. so when a user is created i have to get the userId from membership users table. how can i do that?
thanx in advance
Hi All,
In my application screen, i am having a field, where user can to choose his DateOfBirth.
I want to popup any built-in "Date" calendar or some built-in Date picker to user, so that it will look professional. As i'm new to this development, i wanted to know there is any code sample available to popoup the built-in Date Picker?
Note: I also want to store the selectable Date by user after selecting it in my existing persistent storage.
Thank you for your suggestions.
Hello,
i try to add a generated SPFieldLookup to a List. That works fine, but theField only added to the default ContentType. How can I add the LookupField to all ContentTypes fromthe List?
I have a field ,if user enters data it should go and check db if it is present it should redirect to next page.
But here i m not sure whether it is checking the db but mysql query is correct.
$ThirdPartyCategoryName =$_POST['ThirdPartyCategoryName'];
$activate = mysql_query("SELECT * FROM `thirdpartycategorymaster` WHERE `delete` = 'y' ");
if($activate=='y')
{
header("location:catact.php");
}
else
{
//$activate=='NULL';
header("location:tp_home.php");
}
Hi all,
I am learning how to use JQuery validation plugin,
I got a simple input text field like this:
<input type="text" name="username">
But I don't know how to use this plugin to do some data availability tasks.
Could you help me please?
I am uploading a image and want to change the size ( heigth and width) of image (without using plugin) according to the user.
i create two fields in my form - imageWidth and imageHeigth
when user enter the values in certain field, size of the image will be changed according to those values.
please help me.
Thanks and regards.
hi all
i am new in thefield of iphone development ....
i am working on a game in which when user touch on a image then a nib file must be pop up on the scree and i am unable to do that..
please help provide some sample code or any kind of help
thanks in advance
can anyone plz provide me a simple working code snippet of codeigniter for uploading 2 images at once (through 2 different input field ofcourse). I need 2 images to be uploaded at once, or one after another. and both of the images need to be in different location.
I tried to make it myself by calling upload function twice but it returned last images with these extentions: *.jpg.jpg.
can anyone help
I have a textarea that when a users pressed enter/return on their keyboard, I want to submit thefield to a JavaScript function, just like it works on Twitter.
Ideas?
Thanks
Can any one please let me know the best way to use IF statement in mysql query to show if the "email" field is NULL then it should show as "no email"...
Postcode Telephone Email
----------------------------------------------------------
BS20 0QN 1275373088 no email
BS20 0QN 1275373088 no email
PO9 4HG 023 92474208 [email protected]
SO43 7DS 07801 715200 [email protected]
----------------------------------------------------------
How to check in Oracle Function whether value is increasing in particular field for last 3 year or not. Suppose one table is company and if we want to consider only values if profit of past 3 year of company is in increasing manner.
Hello,
I have a strange problem which I can't fix:
A field:
private boolean[][][] gaps;
Constructor (1st line):
gaps = new boolean[NOBARRICADES][WIDTH][HEIGHT];
Constructor (2nd line):
for (int i = 0; i < NOBARRICADES; i++) {
JAVA throws an error for the 2nd line, saying:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
Does it have anything to do with JAVA syntax (the mistake is in these lines of code) or I should look for the problem somewhere else?
Say you have a user table and an order table which references user (user has_many orders) and contains an item count field.
How could you efficiently ask "how many uses ordered how many items?"
That is, to generate something along the lines of:
Number of users | sum of items
-------------------------------
5 users | 1 item
4 users | 5 items
1 user | 7 items
Thanks in advance.
Hi, in C if I have a printf statement containing say "%.2f", it says that the precision is 2 digits after the decimal place. I haven't explicitly specify the width. I have two questions:
Is this good programming practice?;
Is without specifying the width means that the width of thefield will get adjusted automatically when printing the number, irrespective of the number of digits it contains?
Thanks a lot...
My Windows application GUI is accepting some required application configuration fields fromthe user. I need to store them of course, but I wanna hide these fields fromthe user.
I cannot use database to store these configs.
I want to avoid using app.config either. (No app.config encryption)
Any suggestions, Where and in which format i should store fields. (Field example is: Accepting database User credentials, Task Schedule info etc.)
I'm trying to create a query and need to join against something that I can define values in without creating a table.
I'll attempt to describe what I'm trying to do:
table1 is joined on field a with table2 (titles for FK in table 1)
- Table1 has values outside of what exists in table2
- I want to add an additional 'table' to be unioned with table2 and then joined with table 1
Thanks
Hello
I have a problem with "CFDataRef.
I get the "data" fieldfrom a "kCFSocketDataCallBack.
"data" should correspond to a string received on the socket.
How do I convert, for example, in a NSString so I can put my text in a textbox??
Thank you very much
static void
AcceptDataCallback(CFSocketRef s,
CFSocketCallBackType type, CFDataRef
address, const void *data, void *info)
{
//my code for the textBox
}