Displaying 20 results from an estimated 100000 matches similar to: "Comparing form enrty to a databse record"
2006 Jul 03
0
Check if row already exists?
I''m working on a system that has a series od "bids" associated with
"posts". Vurrently when a bid is placed I have it creating a new row
each time in the "bids" table. The bids table has id, post_id, and
user_id.
The logic is to check to see if a bid already exists with a given
post_id and user_id. If it does, then just update the "amount"
2005 Sep 22
3
AGI Script to interact with ACCESS Databse and Set CID info on the fly.
Well guys here comes the fun part. I have a Microsoft access (VBA)
application that interfaces with my SQL database. This app pulls of info
from the SQL record and than picks up the phone and dials that locations
number. I have purchased a few hundred NpaNxx's for my own use. I want get
into too much detail there but no worries this is legal. I need to change my
CID info on the fly. So I am
2011 Dec 27
2
comparing fields within a record
Hi,
I hope this isn't a really simple question, I've been struggling with it
for a while.
I'm looking for a way to get a function to go through a data frame line by
line, compare fields, and produce a result, kind of a transform and an if
statement combined (I tried to put them together and it didn't work).
So, consider data Sales:
House number Inspected Sold
1
2006 Apr 20
1
Returning Count from find_by_sql
I want to return an int from a find_by_sql call. But when I use that
result to compare to another count the error tells me I have an array.
MODEL:
# Returns the number of comments in a specified post
def self.find_count(post_id)
find_by_sql(["SELECT COUNT(*) FROM commments WHERE post_id = ?",
post_id])
end
CONTROLLER:
def test
@post =
2006 Jul 12
1
Question re: Computing a field in a DB record
I''m just learning Rails and have encountered a problem trying to set
a field in a DB record based on the value of another form input
field. Using the scaffold code, the create works as expected and the
update (edit) also works. However, one of the DB fields (amount) is
supposed to be computer from another (units): if the category field
is "Mileage", amount= units *
2003 Jun 17
0
Access Databse
This mail is probably spam. The original message has been attached
along with this report, so you can recognize or block similar unwanted
mail in future. See http://spamassassin.org/tag/ for more details.
Content preview: Hi, I'm running samba as a file store in our windows
2000 domain and are having a few problems with MS Access, we have a
couple of users accessing the same mdb file,
2005 Sep 22
0
AGI Script to interact with ACCESS Databse a nd Set CID info on the fly.
lol just posted this yesterday, it's for any ODBC DSN so Access or SQL or an
Excel spreadsheet, as long as it's set as a DSN. This will work with
outgoing Caller ID as well, it's just how you set it up in your dialplan. If
you want I can email you the .agi since email will undoubtedly mangle the
script. hth.
HOWTO: A simple AGI application to modify incoming CallerID on the fly using
2004 Jan 13
0
samba as pdc pam authentication with postgres databse
dear friends,
My problem is ...
i configured samba as primary domain controller. it
successfully working in windows 98 clients...
then i tried to configure the samba(pdc) to authenticate through PAM
authentication with postgres database. but it fails.. i installed pam
postgres module sucessfully
how to configure samba(pdc) as PAM authentication.. is it possible. when
i
2014 Sep 22
1
SIPAddHeader from a realtime databse
Hi Guys
I'm using asterisk 1.8.23.1
When I add a SIP Header from inside the extensions.conf
(SIPAddHeader(Alert-Info:<http://www.notused.com>\;info=alert-internal\;x-line-id=0)
) it works fine.
When I try to do the same thing from within a database table, all of the
string apart from x-line-id=0 gets ignored. I've tried escaping the
semicolon and not escaping it and the result is
2008 Apr 14
2
Problems with nil object
Hi to all. I''ve a very big problem. I know this can seem very loing, but
please, try to read it. I have a simply blog, with posts and their
comments. I''ve two tables in my db, posts, with post id, text and
comments_count to store the number of comments-children of each post (as
recomanded to do in AWDWR); and the table comments, with comment id,
post_id for the post
2008 Jul 17
1
Comparing differences in AUC from 2 different models
Hi,
I would like to compare differences in AUC from 2 different models, glm and gam for predicting presence / absence. I know that in theory the model with a higher AUC is better, but what I am interested in is if statistically the increase in AUC from the glm model to the gam model is significant. I also read quite extensive discussions on the list about ROC and AUC but I still didn't find
2006 Mar 15
2
comparing AIC values of models with transformed, untransformed, and weighted variables
Hi there, I have a question regarding model comparisons that seems
simple enough but to which I cannot find an answer. I am interested in
developing a predictive model relating some measure of a tree's stem to
the total leaf area (TLA) of the tree. Predictor variables might
include, for example, the total cross-sectional area of the tree
(commonly referred to as basal area) or the amount
2006 Apr 08
2
trouble expiring cached pages
I''m having a bear of a time getting my cached pages to expire. Maybe
one of you guys can help me out. I''ll show my sweeper and then my log
to show that it "should" be working.
class PragmaticSweeper < ActionController::Caching::Sweeper
observe Comment
def after_save(comment)
expire_page(comment.post_id)
end
private
def expire_page(post_id)
2009 Apr 15
2
Getting Started with Rails - post_comment_url
Hi,
Thanks for a wonderful Getting Started with Rails. I am up to the last
section and just added the comments part.
So while testing and looking over comments_controller.rb;
I see the reference to post_comment_url calll where is this defined.
Below is the message I am getting.
Thanks
ActionController::RoutingError (post_comment_url failed to generate
from {:post_id=>#<Post id: 1, name:
2006 Aug 31
0
ActiveResource
I''ve been sitting on an ActiveResource patch for a few weeks, waiting
to get some feedback from David. But, I see other folks like Jeremy
are starting to use it, so I committed my patch:
http://dev.rubyonrails.org/changeset/4890
It gets all the basic operations in working order, and adds support
for prefixes. I wasn''t quite sure how to pull this off. Right now,
I''m
2006 Aug 05
0
Another generic CRUD controller
I''ve been using this template on most of my CRUD controllers.
class CommentsController < ApplicationController
meantime_filter :set_scope
before_filter :find_comment, :only => %w(show edit update destroy)
def index
@comments = Comment.find(:all)
end
def new
@Comment = Comment.new
end
def create
@comment = Comment.create!(params[:comment])
2006 Oct 16
6
Rails AR/Oracle Unit Test: [5310] failed (but getting better)
"rick" has given AR/Oracle some love, but it''s still unhappy...
http://dev.rubyonrails.org/changeset/5310
------------------------------------------------------------------------
r5310 | rick | 2006-10-16 08:42:55 -0700 (Mon, 16 Oct 2006) | 1 line
Fix has_many :through to add the appropriate conditions when going through an association using STI. Closes #5783. [Jonathan Viney]
2006 Aug 12
1
Strategy pattern: comparing Context/Specify to Given/When/Then
Comments and suggestions for improving the specifications are welcome.
Thanks,
Alvin
One example comparing context/specify (CS) with given/when/then (GWT)
with a strategy pattern follows:
Consider a pipeline transporting oil supplied by multiple partners.
The amounts transported on behalf of each partner are recorded as
transactions in a general ledger.
There are multiple approaches to
2007 Jan 01
0
Simple question on inserting child data
after doing a bunch of reading I have finally sat down to create a
simple app to dirve home a lor of the concepts to which have been read.
So I figured a simple blog app is the best way to do it. The bad
thing is that I am already hung up when creating replies to a blog
posting.
I can''t figure out how to insert the post_id value into the reply
table. When creating a reply the user is
2006 Jun 08
5
Displaying Calculation on Index
Hi, I am trying to create a simple point system and display the total on
my index page. So I have my db basically setup like this:
Posts
id, body, created_at, user_id
Post_points
id, post_id, user_id, created_at, value
So as you can see I am allowing other users to create points on the post
and my db will store who gave the point as well. "value" is the point
value which can