similar to: active record mysql query help

Displaying 20 results from an estimated 7000 matches similar to: "active record mysql query help"

2006 Mar 13
9
apache 1 fastcgi config correct???
I followed this tutorial on the rails wiki about how to get apache with fastcgi working on a vps machine: http://wiki.rubyonrails.com/rails/pages/HowtoInstallAndRunRubyOnRailsOnCpanel In the tutorial it said to add this to the httpd.conf file to get fastcgi working. <IfModule mod_fastcgi.c> FastCgiIpcDir /tmp/fcgi_ipc/ AddHandler fastcgi-script .fcgi </IfModule> However
2007 Mar 01
2
Query about data manipulation
Hi Thanks much for the prompt response to my earlier enquiry on packages for regression analyses. Along the same topic(?), I have another question about which I could use some input. I am retreiving data from a MySQL database using RODBC. The table has many BLOB columns and each BLOB column has data in the format "id1 \t id2 \t measure \n id3 \t id4 \t measure...." (i.e. multiple rows
2000 Mar 08
2
possible BUG with as.data.frame() and/or [.data.frame
Here is a possible BUG with as.data.frame() and/or [.data.frame which broke Michael Lapsleys RODBC-Code. Can anyone confirm it is a bug or a 'feature' of the prototype? tablename <- "abc" a <- as.data.frame(cbind("abc", 1:3)) b <- as.data.frame(cbind(tablename, 1:3)) # ok > a V1 V2 1 abc 1 2 abc 2 3 abc 3 # missing column name > b tablename 1
2011 Jul 27
1
Referencing a column using a function argument
Hi all, I've been having trouble with something that seems like it should be fairly straight forward. Any help at all from more experienced users is appreciated! I'd like to write a function that uses a column name as an argument. However, I run into problems when I try to reference this column within the function. For example, findCutoff <- function(tableName, columnName) {
2006 Aug 08
8
executing external code
I''m trying to run some non-ruby code in my rails app and i''m not sure how to do this. The code i have would take a really long time to port to ruby and so i''d rather run it as is (its php). What i would like to have happen is that the code can be invoked as an ajax call. And just return some data in JSON. I keep running into a routing failure by actioncontroller and
2012 Jun 18
4
Problem with exists? method
Hi, I have a DB with table TABLENAME, column COLUMN and an active resource client trying to connect to the DB. When i do Tablename.find(:all) => i get all the entries from the table But Tablename.exists?(:column => value) always returns false I verified that the above command works from rails console. Dont understand why it always returns false even when there are valid records. And in
2006 Mar 07
5
subversion help!
I created a subversion repository on my new vps and i''m trying to setup my rails app there. However i keep getting this error: subversion/libsvn_subr/io.c:2516: (apr_err=13) svn: Can''t create directory ''/home/svnadmin/rapleaf/db/transactions/0-1.txn'': Permission denied How do i fix this? I know others have had this before, so i would appreciate some help.
2004 May 10
3
sqlSave with underscores in table fieldname
Hi group, I try to write a frame to a table (RODBC). I use colnames(temp6) <- c("ind_id","ser_id","period_id","year","calc","mean") sqlSave(channel, temp6, tablename = "series_indices_test",append= TRUE, rownames=FALSE, verbose = FALSE, test = FALSE, nastring = -999999, fast = FALSE) This is giving me an error: Error in
2007 Mar 23
6
Updating a worksheet in Excel file using RODBC
Hello! I have no problem reading Excel files (each worksheet in the file is a "table" which can be read - at least in my case). What I would like to do is to read such a table, change it (just the contents, not the format) and write it back, and this I can not do. I am getting the following error messages (3 slightly different attempts): > sqlSave(con, x, tablename =
2007 Jun 26
2
MySQL Where conditions automatic formatting
Hi, I''m having a problem with the automatic formatting of my mysql query. My code is this: Tablename.find(:all, :conditions => {:id => list}) Where list is a list of id''s (8,9,10) The problem is that the query is automatically formatted to this: SELECT * FROM Tablename WHERE (id in (''8,7,9'')) I need this query to run without the extra single quotes
2006 Jun 09
3
sqlSave() and rownames=TRUE makes my Rgui crash
Hello, I created a table in MySQL with this command CREATE TABLE example (pk INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(pk), id VARCHAR(30),col1 VARCHAR(30),col2 VARCHAR(30)) ### In R, I can connect to this table: library(DBI) library(RODBC) chan <- odbcConnect("MySQL51", uid="root", pwd="xxx") first <- sqlQuery(chan, "select * from example")
2009 Oct 16
2
RODBC sqlSave does not append the records to a DB2 table
I am running R version 2.9.2 on Windows XP OS with RODBC version Version: 1.3-0. Has anyone out there in the R user community successfully appended records to a DB2 table on a remote database using the sqlSave function in the RODBC package? (or by any other means from R?) I posed a similar question a few months ago and unfortunately, did not receive a response. I was hoping recent upgrades to
2018 Jan 24
1
Help with SQLsave
Hi all, I'm using RODBC library to connect to a database. I'm trying to read a table from a database and after manipulating it would like to write to the same database but with a different table P<-data.frame(sqlQuery(myconn,'select? *? from Demographics')) sqlSave(myconn,p,tablename="trial",rownames=FALSE) I'm gettng this error Version:1.0
2012 Apr 05
3
help in paste command
i have a character variable tablename="DressMaterials" var1=("red","blue","green","white") My output should be like select * from DressMaterialswhere colors in ("red","blue","green","white") i'm not able to get the where part. my code paste(select * from ", tablename , " where colors in
2006 Mar 08
3
migrations schema_info table, Rails Recipes Bug?
I have the rails recipes book and i was going through the migrations recipe. Everything seemed to work except for the last part in trying to do a rake migrate with a migration file version 1 and the schema_info version set to 0. Without the force attribute, the rake migration fails, as expected. So the recipe says to run this: ruby script/runner
2006 Feb 14
1
Associating a query with a active record class
Is there a way by which i can associate a complex query with a Model class without using a VIEW, so that i can access all the names of the columns returned by the query.
2011 Dec 27
1
sub query issue with active record.
i can manage the MySQL queries into active record.but in some cases basically with sub-queries.i didn''t get the correct output. here when i trying to change the MySQL queries into active-record. *MySQL Query* *select count(*) from ( SELECT transactions.loyalty_id FROM transactions JOIN loyalties ON (transactions.loyalty_id = loyalties.id) where loyalties.created_at >
2006 Nov 04
2
sql query in active record
hi all, if i want to write a query select * from a,b where a.b_id=b.id in active record using joins,condition how can i write that in docs i found for conditions you do by giving "?" and then the parameter eg. a.b_id=? but it takes b.id as string i.e a.b_id=''b.id'' i dont want that any suggestions thanks in advance regards gaurav -------------- next
2019 Apr 16
3
PROBLEMAS NOMBRES DE COLUMNAS CON ESPACIOS CONEXION R-SQL
Buenas tardes, Estoy tratando de realizar un update en SQL desde R: sqlUpdate(conexion1, data.frame(AUXILIAR), tablename = "AUXILIAR") y me devuelve el siguiente error: *Error in sqlUpdate(conexion1, data.frame(AUXILIAR), tablename = "AUXILIAR", : * * data frame column(s) Corteoptimo Cortediario not in database table* El problema es que sí existen esas columnas en SQL pero
2006 Apr 09
4
submitting forms help
I cant seem to figure this problem out and i was hoping someone could help me out. I have a page with a list of forms. I would like the user to be able to submit each form individually, or submit them all at once, to a different action (bascially, one that will do batch processing of all the forms). Is this possble? Please help. -------------- next part -------------- An HTML attachment was