Hello,
I get this exception on my Windows 7 64bit in application running in VS 2008 express. I am using Connector/Net 6.2.2.0:
Message:
Object reference not set to an instance of an object.
Source:
MySql.Data in MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)
Stack trace:
in MySql.Data.MySqlClient....
Quoting MySQL INSERT manual - same goes for UPDATE:
Use the keyword DEFAULT to set a column explicitly to its default value. This makes it easier to write INSERT statements that assign values to all but a few columns, because it enables you to avoid writing an incomplete VALUES list that does not include a value for each column in t...
i have this
SELECT COUNT(1) cnt, a.auther_id
FROM `posts` a
LEFT JOIN users u ON a.auther_id = u.id
GROUP BY a.auther_id
ORDER BY cnt DESC
LIMIT 20
its wo...
Hi everyone
We have an order book and invoicing system and I've been tasked with trying to output monthly rolling totals from these tables.
But I don't know really where to start with this. I think there's some SQL syntax that I don't even know about yet. I'm familiar with INNER/LEFT/JOINS and GROUP BY etc but grouping by date is confus...
I'm creating a small framework for my web projects in PHP so I don't have to do the basic work over and over again for every new website. It is not my goal to create a second CakePHP or Codeigniter and I'm also not planning to build my websites with any of the available frameworks as I prefer to use things I've created myself in general....
I want to help the Dev team identify areas of knowledge (practical and theoretical) that they can work on. Though I am big believer in focusing on people's strengths being a good programmer requires (I think) being challenged by concepts and ideas that don't always come naturally. We work largely in the web app space using PHP & MySQL ...
I have a table of values, with one of the columns being of type SET.
If it currently has the members ('a', 'b', 'c', 'd'), how do I add 'e' to the possible values?
I realize that using a SET type is a little strange, and I'm unclear why one would use it instead of a foreign key to another table with the values of the set, but I didn't ...
Hi,
I am new to mysql and I am looking for some answers to the follwoing questions:
a) Can mysql community server can be leveraged for a key-value pair type database.??
b) Which mysql engine is best suited for a key-value pair type database ??
c) Is Mysql cluster a must for horizontal scaling of key-value based datastore or can i...
Hello - I am very, very, new to mySQL. I've got experience in general technical terms, but not with the syntax or concepts of mySQL. I have been tasked with exporting a table from MySQL into a pipe delimited .txt or .xls that I can use to add 7500 more records to manually, then import back into the table. I tried to use INTO OUTFILE, ...
Hi,
I need some advice from experts :)
I will develop a website using PHP and I will use also MySQL. I bought some server space from a Virtual private server including all the service needed.
How should I develop the site? Shall I develop it on my machine at home (using for example Wamp), and when ready transfer all the files to the ser...
I've got a query that currently queries a Post table while LEFT JOINing a Comment table. It fetches all Posts and their respective Comments. However, I want to limit the number of Comments returned. I tried adding a sub-select, but ran into errors if I didn't LIMIT the results to 1. I'm really not sure how to go about this while still u...
In my SQL Server 2005 server I create databases and logins using Management Studio. My application requires that I give a newly created user read and write permissions to another database.
To do this I right-click the newly created login, select properties and go to User Mapping. I put a check beside the database to map this login to th...
Hi,
I have the following named_scope which works fine in MySQL and sqlite but bombs in Postgres:
course.rb
named_scope :current, :conditions => ['start < ? AND end > ? ', Time.now, Time.now], :order => 'start ASC'
Then I just call:
Course.current
I get the error:
PGError: ERROR: syntax error at or
near "end" LINE 1: ... W...
I am looking for a php pagination class, I have used a rather simple one in the past and it is no longer supported.
I was wondering if anyone had any recommendations ?
It seems pointless to build my own when there are probably so many good ones out there.
Thanks in advnace!
...
I have
Table: ARTICLES
ID | CONTENT
---------------
1 | the quick
2 | brown fox
3 | jumps over
4 | the lazy
Table: WRITERS
ID | NAME
----------
1 | paul
2 | mike
3 | andy
Table: ARTICLES_TO_WRITERS
ARTICLE_ID | WRITER_ID
-----------------------
1 | 1
2 | 2
3 | 3
To summarize, article 4 has no w...
Hey stackers,
I’ve been grinding my head on this for a while… My goal is to return all dates that fall between a start and end date and have a certain period as a factor, from the start date. (hard to explain)
For example…
Start Date: Nov 20, 1987; End Date: Jan 01, 1988; Period: 10 days;
I want these dates: Nov 20, 1987; Nov 30, 19...
My provider installed to my site Drupal CMS. Now I need copy all my data from old site. I have tables without prefixes in my old DB, but in new DB all tables have "dp_[table_name]" prefix.
...
My problem is a bit hairy, and I may be asking the wrong questions, so please bear with me...
I have a legacy MySQL database which stores the user passwords & salts for a membership system. Both of these values have been hashed using the Ruby framework - roughly like this:
hashedsalt =
Digest::SHA1.hexdigest("--#{Time.now.to_s}--...
I have a table with a column 'A'.
Some rows have 14 digits for the column 'A' and some have only 12. I need to transform all the entries to 14 digits. The datatype is varchar
I would like to update all the rows at once (one query), adding zeros before the first digit, so an entry like 012345678910 would become 00012345678910.
Is it po...
Is there a way to make Linq to Entities map unrecognized methods/functions to MySql functions?
I want to add support to some functions like Convert.*
...