Search Results

Search found 1372 results on 55 pages for 'userid'.

Page 33/55 | < Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >

  • What's the best way to use NHibernate for objects without ID?

    - by Khash
    I have some classes in my app that don't require an ID to be persisted. These could be things like user logs or audit records. I can add an arbitaty id to them but I would like to avoid that as they don't mean anything. The retrieval of these objects is always on another key (like UserId) which is not unique to the record.

    Read the article

  • Accessing inner value of ASP.NET Web User Control

    - by Fabian
    Surprised that i havent been able to find this myself, but anyway. Let's say i use my web user control like this: <myprefix:mytag userid="4" runat="server">Some fancy text</myprefix:mytag> How would i be able to access the text inside the tags from its codebehind? Was expecting it to be exposed through this.Text, this.Value or something similar.

    Read the article

  • MS Access query for time

    - by nisha
    following data and using MS Access with VB6 UserID UserName LogTime LogDate 1 S 9:00 21/5/2010 1 S 10:00 21/5/2010 1 S 11:00 21/5/2010 1 S 12:00 21/5/2010 1 S 14:00 21/5/2010 1 S 17:00 21/5/2010 Need Output as in below 6 columns:- 1 S 21/5/2010 9:00 21/5/2010 10:00 1 S 21/5/2010 11:00 21/5/2010 12:00 1 S 21/5/2010 14:00 21/5/2010 17:00

    Read the article

  • AutoMapper: setup member name matching convention

    - by epitka
    I tried setting up a member name mapping convention so that the source members ending with a "Id" are mapped to destination members without Id. For example UserId - User How does one do this? I tried using SourceMemberNameTransformer without success. Also tried using RecognizePostfixes(). this.SourceMemberNameTransformer = s => { return s.Replace("Id", string.Empty); };

    Read the article

  • facebook login in my application

    - by sravan-grs
    how to enter in my application by checking userid and password of facebook. i used . but html is supporting that button and facebook login page is opening but after entering the id and password, its not going to myhome.aspx page. please help me

    Read the article

  • MYSQL updating data from other table

    - by atif089
    Hi, I have two tables like of this structure content (content_id, content_type, user_id, time, comment_count) comments (comment_id, content_id, userid, comment, comment_time) What I wold like to do is update the comments_count field with sum of comments i.e COUNT(content_id) from the comments table. I am not able to figure out the right syntax Thanks

    Read the article

  • What's SQL table name for table between 'Users' and 'UserTypes' ?

    - by Space Cracker
    i have tow tables in my database : Users : contain user information UserTypes : contain the names of user types ( student , teacher , specialist ) - I can't rename it to 'Types' as we have a table with this name relation between Users and UserTypes many to many .. so i'll create a table that have UserID(FK) with UserTypeID(FK) but I try to find best name for that table ... any suggestion please ?

    Read the article

  • mysql update unique index

    - by atno
    Is there a way to say UPDATE items SET qty=10 WHERE **unique key** instead of saying UPDATE items SET qty=10 WHERE userID=1 AND listID=10 and itemID=100 on the following table? CREATE TABLE IF NOT EXISTS `items` ( `userID` int(20) NOT NULL, `listID` int(20) NOT NULL, `itemID` int(20) NOT NULL, `qty` int(10) NOT NULL, UNIQUE KEY `unique` (`userID`,`listID`,`itemID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

    Read the article

  • Entity framework 4 add to many-to-many

    - by mehanik
    I have model whith 3 tabels and one is link table with additional field: Groups Id Name Users Id Name Roles Id Name LinkTable Id GroupId UserId RoleId The quuestion is how to add 3 related entities: Code bellow doesn't work. using (var db = new dbEntities()) { db.Groups.AddObject(Group.CreateGroup(1, "TestGroup")); db.Users.AddObject(User.CreateUser(1, "AdminUser")); db.Roles.AddObject(Role.CreateRole(1, "Admin")); db.UserGroupRoles.AddObject(UserGroupRole.CreateUserGroupRole(1, 1, 1, 1)); db.SaveChanges(); }

    Read the article

  • PHP & MySQL - saving and looping problems.

    - by R.I.P.coalMINERS
    I'm new to PHP and MySQL I want a user to be able to store multiple names and there meanings in a MySQL database tables named names using PHP I will dynamically create form fields with JQuery every time a user clicks on a link so a user can enter 1 to 1,000,000 different names and there meanings which will be stored in a table called names. Since I asked my last question I figured out how to store my values from my form using the for loop but every time I loop my values when I add one or more dynamic fields the second form field named meaning will not save the value entered also my dynamic form fields keep looping doubling, tripling and so on the entered values into the database it all depends on how many form fields are added dynamically. I was wondering how can I fix these problems? On a side note I replaced the query with echo's to see the values that are being entered. Here is the PHP code. <?php if(isset($_POST['submit'])) { $mysqli = mysqli_connect("localhost", "root", "", "site"); $dbc = mysqli_query($mysqli,"SELECT * FROM names WHERE userID='$userID'"); $name = $_POST['name']; $meaning = $_POST['meaning']; if(isset($name['0']) && mysqli_num_rows($dbc) == 0 && trim($name['0'])!=='' && trim($meaning['0'])!=='') { for($n = 0; $n < count($name); $n++) { for($m = 0; $m < count($meaning); $m++) { echo $name[$n] . '<br />'; echo $meaning[$m] . '<br /><br />'; break; } } } } ?> And here is the HTML code. <form method="post" action="index.php"> <ul> <li><label for="name">Name: </label><input type="text" name="name[]" id="name" /></li> <li><label for="meaning">Meaning: </label><input type="text" name="meaning[]" id="meaning" /></li> <li><input type="submit" name="submit" value="Save" /></li> </ul> </form> If needed I will place the JQuery code.

    Read the article

  • Questions about grails filters

    - by manojsingh
    Basically I have 2 questions regarding grails filters. According to grails documentation you can do something like below in a filter if (userId != paramsUserId) { flash.message = "You can only modify yourself" redirect(action: 'list') return false } If the above condition is true then how will the return statement get executed ? Can I have a redirect in my filter to a some action which also has a redirect ?

    Read the article

  • NHibernate Mapping + Iset

    - by jack
    Hi all I have a mapping file <set name="Friends" table="Friends"> <key column="UserId"/> <many-to-many class="User" column="FriendId"/> </set> I would like to specify extra columns for the friend table this creates. For example Approve (the user must approve the friend request) Is there a easy way?

    Read the article

  • Not sure what happens to my apps objects when using NSURLSession in background - what state is my app in?

    - by Avner Barr
    More of a general question - I don't understand the workings of NSURLSession when using it in "background session mode". I will supply some simple contrived example code. I have a database which holds objects - such that portions of this data can be uploaded to a remote server. It is important to know which data/objects were uploaded in order to accurately display information to the user. It is also important to be able to upload to the server in a background task because the app can be killed at any point. for instance a simple profile picture object: @interface ProfilePicture : NSObject @property int userId; @property UIImage *profilePicture; @property BOOL successfullyUploaded; // we want to know if the image was uploaded to out server - this could also be a property that is queryable but lets assume this is attached to this object @end Now Lets say I want to upload the profile picture to a remote server - I could do something like: @implementation ProfilePictureUploader -(void)uploadProfilePicture:(ProfilePicture *)profilePicture completion:(void(^)(BOOL successInUploading))completion { NSUrlSession *uploadImageSession = ..... // code to setup uploading the image - and calling the completion handler; [uploadImageSession resume]; } @end Now somewhere else in my code I want to upload the profile picture - and if it was successful update the UI and the database that this action happened: ProfilePicture *aNewProfilePicture = ...; aNewProfilePicture.profilePicture = aImage; aNewProfilePicture.userId = 123; aNewProfilePicture.successfullyUploaded = NO; // write the change to disk [MyDatabase write:aNewProfilePicture]; // upload the image to the server ProfilePictureUploader *uploader = [ProfilePictureUploader ....]; [uploader uploadProfilePicture:aNewProfilePicture completion:^(BOOL successInUploading) { if (successInUploading) { // persist the change to my db. aNewProfilePicture.successfullyUploaded = YES; [Mydase update:aNewProfilePicture]; // persist the change } }]; Now obviously if my app is running then this "ProfilePicture" object is successfully uploaded and all is well - the database object has its own internal workings with data structures/caches and what not. All callbacks that may exist are maintained and the app state is straightforward. But I'm not clear what happens if the app "dies" at some point during the upload. It seems that any callbacks/notifications are dead. According to the API documentation- the uploading is handled by a separate process. Therefor the upload will continue and my app will be awakened at some point in the future to handle completion. But the object "aNewProfilePicture" is non existant at that point and all callbacks/objects are gone. I don't understand what context exists at this point. How am I supposed to ensure consistency in my DB and UI (For instance update the "successfullyUploaded" property for that user)? Do I need to re-work everything touching the DB or UI to correspond with the new API and work in a context free environment?

    Read the article

  • Mysql optimization

    - by Jens
    I have this mysql table called comments which looks like this: commentID parentID type userID date comment The commentID is set as Primary key, but most of the time I fetch the data using the parentID. How should I set my indexes? Should I just add an index on parentID and let commentID be the primary key?

    Read the article

  • Time display query in sql

    - by shanks
    I have following data UserID UserName LogTime LogDate 1 S 9:00 21/5/2010 1 S 10:00 21/5/2010 1 S 11:00 21/5/2010 1 S 12:00 21/5/2010 Need Output as:- 1 s 9:00 10:00 21/5/2010 1 s 11:00 12:00 21/5/2010

    Read the article

  • Entity Framework 4 omits some associations during model generation

    - by kzen
    After creating an EF4 model from a SQL Server database I noticed that all the relationships of my Users table were not imported into the model as associations. All the other relationships were imported fine. My Users table has a PK userId which is a char(7) field and it is integrated into several other tables in the database as an FK but for some reason EF4 does not import these relationships as associations during the model generation process... Does anyone have any ideas why this would be happening?

    Read the article

  • CodeIgniter - Calling a function from inside a view

    - by Chris
    Hey, Is it possible to call a function which is located in a controller from a view. This is what i have in my controller, as an example function checkKeyExists($userid, $key){ } Then inside my view i have the following if(checkKeyExists($row->id, $role->key)){ } But when i run it, it says that checkKeyExists is not defined. If anyone can let me know how i could do this, that would be great. Cheers

    Read the article

  • Generating SQL for website

    - by Ethan
    I am working on a webapplication How can i create SQL for the following Database Information User information Username - String Password - String Admin or Client - boolean Last login – Date/Time LogItem typeLogItem – String (Page name?) hitCount – int View PageURL UserID Transaction User – String DateTimeStamp SKU – int Purchase-boolean TransactionID-int Inventory information Sku number - int Item description - String Price to customer - double Count - in

    Read the article

  • GROUP BY and SUM distinct date across 2 tables

    - by kenitech
    I'm not sure if this is possible in one mysql query so I might just combine the results via php. I have 2 tables: 'users' and 'billing' I'm trying to group summed activity for every date that is available in these two tables. 'users' is not historical data but 'billing' contains a record for each transaction. In this example I am showing a user's status which I'd like to sum for created date and deposit amounts that I would also like to sum by created date. I realize there is a bit of a disconnect between the data but I'd like to some all of it together and display it as seen below. This will show me an overview of all of the users by when they were created and what the current statuses are next to total transactions. I've tried UNION as well as LEFT JOIN but I can't seem to get either to work. Union example is pretty close but doesn't combine the dates into one row. ( SELECT created, SUM(status) as totalActive, NULL as totalDeposit FROM users GROUP BY created ) UNION ( SELECT created, NULL as totalActive, SUM(transactionAmount) as totalDeposit FROM billing GROUP BY created ) I've also tried using a date lookup table and joining on the dates but the SUM values are being added multiple times. note: I don't care about the userIds at all but have it in here for the example. users table (where status of '1' denotes "active") (one record for each user) created | userId | status 2010-03-01 | 10 | 0 2010-03-01 | 11 | 1 2010-03-01 | 12 | 1 2010-03-10 | 13 | 0 2010-03-12 | 14 | 1 2010-03-12 | 15 | 1 2010-03-13 | 16 | 0 2010-03-15 | 17 | 1 billing table (record created for every instance of a billing "transaction" created | userId | transactionAmount 2010-03-01 | 10 | 50 2010-03-01 | 18 | 50 2010-03-01 | 19 | 100 2010-03-10 | 89 | 55 2010-03-15 | 16 | 50 2010-03-15 | 12 | 90 2010-03-22 | 99 | 150 desired result: created | sumStatusActive | sumStatusInactive | sumTransactions 2010-03-01 | 2 | 1 | 200 2010-03-10 | 0 | 1 | 55 2010-03-12 | 2 | 0 | 0 2010-03-13 | 0 | 0 | 0 2010-03-15 | 1 | 0 | 140 2010-03-22 | 0 | 0 | 150 Table dump: CREATE TABLE IF NOT EXISTS `users` ( `created` date NOT NULL, `userId` int(11) NOT NULL, `status` smallint(6) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `users` (`created`, `userId`, `status`) VALUES ('2010-03-01', 10, 0), ('2010-03-01', 11, 1), ('2010-03-01', 12, 1), ('2010-03-10', 13, 0), ('2010-03-12', 14, 1), ('2010-03-12', 15, 1), ('2010-03-13', 16, 0), ('2010-03-15', 17, 1); CREATE TABLE IF NOT EXISTS `billing` ( `created` date NOT NULL, `userId` int(11) NOT NULL, `transactionAmount` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `billing` (`created`, `userId`, `transactionAmount`) VALUES ('2010-03-01', 10, 50), ('2010-03-01', 18, 50), ('2010-03-01', 19, 100), ('2010-03-10', 89, 55), ('2010-03-15', 16, 50), ('2010-03-15', 12, 90), ('2010-03-22', 99, 150);

    Read the article

< Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >