在编码协调员中,我有一份标识/登记表,全部建立起来,完美地工作,然而,我如何产生目前用户的名称,即用户名称。 当用户贴上“Welcome,[用户名称]”栏。
我也有必要知道这一点,以便能够从数据库中产生基于目前用户信息数据库的记录,我如何能够这样做? 我把关于密码用户的文献汇编成册,但却发现我所期待的东西。 I m 采用积极记录。
增 编
在编码协调员中,我有一份标识/登记表,全部建立起来,完美地工作,然而,我如何产生目前用户的名称,即用户名称。 当用户贴上“Welcome,[用户名称]”栏。
我也有必要知道这一点,以便能够从数据库中产生基于目前用户信息数据库的记录,我如何能够这样做? 我把关于密码用户的文献汇编成册,但却发现我所期待的东西。 I m 采用积极记录。
增 编
echo $this->session->userdata( name )
将这些资料纳入db选择档案,例如,如果你有文件证明,如果你在记录时想要显示,则将会议数据作为在db中点。
我建议你将本届会议的所有数据输入数据库,如届会类别所示。
How is your login form performing the login action ? In most cases it s using session to identify that you are logged in. After you confirm (usually with database) that a user is OK drop user info in session (ID, readable name, and any other things you need) and next:
echo "Welcome " . $_SESSION["username"];
I have a query where I need to modify the selected data and I want to limit my results of that data. For instance: SELECT table_id, radians( 25 ) AS rad FROM test_table WHERE rad < 5 ORDER BY rad ...
I have model represent association rule (Body => Head) def Item has_many :heads has_many :bodies ... end def Rule has_many :heads has_many :bodies ... end def Body belongs_to :item belongs_to :rule ...
Today we had a lot more activity than normal between our Ruby on Rails application and our remote legacy SQL Server 2005 database, and we started getting the error below intermittently. What is is? ...
I am trying to run an active record migration but am receiving the following error: undefined method info for nil:NilClass Here is the 2 lines of code in my rake task that runs the migration ...
While playing around with one-to-one associations in castle activerecord I stumbled upon the following problem: I m trying to model a one-to-one relationship (user-userprofile in this case). I ...
I have an Event model, which stores an event feed for each user. I also need to email the updates to users which have enabled email notifications in their profile. From an architectural point of view,...
I have a these 3 models: class User < ActiveRecord::Base has_many :permissions, :dependent => :destroy has_many :roles, :through => :permissions end class Permission < ActiveRecord::...
How to do that with ActiveRecord? My code: p = Product.create l = Label.create p.labels.add << l But I get l.parent == nil create_table "labels", :force => true do |t| t.integer "...