Hello
I need the values of form inputs to be populated by the sql database. My code works great for all text and textarea inputs but I can't figure out how to assign the database value to the drop down lists eg. 'Type of property' below. It revolves around getting the 'option selected' to represent the value held in the database.
Here ...
In MySQL 5.0 why does the following error occur when trying to create a view with a subquery in the FROM clause, "ERROR 1349 (HY000): View's SELECT contains a subquery in the FROM clause"?
If this is a limitation of the MySQL engine then why haven't they implemented this feature yet?
Also, what are some good workarounds for this limita...
I have a couple tables in which I created an object ID as either an Int or Bigint, and in both cases, they seem to autoincrement by 10 (ie, the first insert is object ID 1, the second is object ID 11, the third is object ID 21, etc). Two questions:
Why does it do that?
Is that a problem?
...
Are there any popular Mysql rss feeds you guys can recommend? IBM has random articles but those are usually not enough
...
Let's say I've got some Perl code that increments a column in a specific row of a database each time it's hit, and I'm expecting it to be hit pretty frequently, so I'd like to optimize it with FCGI. Right now, I basically wrapped most of the code in something like this:
while (FCGI::accept() >= 0) {
[code which currently creates a db ...
I know this question has been asked before, but I ran into a problem.
Oddly enough, when I execute this function, it includes the html of the page that the link you select to execute the function.
function exportCSV($table) {
$result = mysql_query("SHOW COLUMNS FROM ".$table."");
$i = 0;
if (mysql_num_rows($result) > 0) {
...
Problem solved: Thanks guys, see my answer below.
I have a website running in Tomcat 5.5 hooked up to a MySQL5 database using Hibernate3.
One record simply refuses to keep any changes performed on it. If I change the record programmatically, the values revert back to what they were previously.
If I manually modify the record in the d...
Hello...my question is similar to other friend posted here...we are trying to develop an application that supports possibly terabytes of information based on a land registry in Paraguay with images and normal data.
The problem is that we want to reduce the cost of operation to minimum as possible because it´s like a competition between...
I came across PHP way of doing the trick:
my_bool reconnect = 1;
mysql_options(&mysql, MYSQL_OPT_RECONNECT, &reconnect);
but no luck with MySQLdb (python-mysql).
Can anybody please give a clue? Thanks.
...
I need to run a RLIKE query on a database mmoved from MySQL to SQL Server 2005 however having problems replicating the "RLIKE" functionality that MySQL provides.
Does anyone have any ideas?
Cheers,
Chris
...
I've got a table of hardware and a table of incidents. Each hardware has a unique tag, and the incidents are tied to the tag.
How can I select all the hardware which has at least one incident listed as unresolved?
I can't just do a join, because then if one piece of hardware had multiple unresolved issues, it would show up multiple tim...
Hi people
I have an issue with trying to keep AR finders DRY in my application. I have created a blogging application which fetches all the related pages,posts,links,tags and categories for a blog when a user first views it. A sample show action for the Blog controller is shown below:
def show
#find blog by user name
@user= Use...
Is there a way to get the raw SQL string executed when calling PDOStatement::execute() on a prepared statement? For debugging purposes this would be extremely useful.
...
I have a table (volunteers_2009) that has all the volunteers stored within, then I have a table (venues) that list all the different venues a volunteer could work (volunteers are assigned to one venue each, and that is stored within volunteers_2009.venue_id, which equals venues.id)
The venues table also has a column for emails, each ema...
I've recently gotten my hobby java project embedded into a page thanks to this very site, but now I'm having some security issues.
I have the include:
import java.sql.*;
and the line:
Class.forName("com.mysql.jdbc.Driver").newInstance();
as well as a mysql .jar file in my src directory, it works from the console, and in the applet...
I am working on a project that is going to use CouchDB for flexible storage of documents. The requirements of my system are a neat match for CouchDB for storage.
BUT
My question really boils down to this:
Should I keeop using ActiveRecord and MySQL as well ... there are a raft of handy Plugins that are all readily available for use wit...
I have code looking something like this:
$data = file_get_contents($tempFile); // perhaps 30MB of file data, now in PHP's memory
$hash = md5($data);
$query = "INSERT INTO some_table
SET BlobData = '" . mysql_real_escape_string($data) . "',
BlobHash = '$hash'
";
mysql_query($query);
I know this isn't very ...
MySQL 5.0.45
What is the syntax to alter a table to allow a column to be null, alternately what's wrong with this:
ALTER mytable MODIFY mycolumn varchar(255) null;
I interpreted the manual as just run the above and it would recreate the column, this time allowing null. The server is telling me I have syntactical errors. I just don't...
My MySQL database contains several tables using different storage engines
(specifically myisam and innodb). How can I find out which tables are
using which engine?
...
I mainly use CocoaMySQL and YourSQL on the Mac, but I am looking for suggestions for Windows, in which I can connect to the database and manage it using the interface.
...