So I'm trying to import some sales data into my MySQL database. The data is originally in the form of a raw CSV file, which my PHP application needs to first process, then save the processed sales data to the database.
Initially I was doing individual INSERT queries, which I realized was incredibly inefficient (~6000 queries taking almo...
I have problems with some character display, like "ñ" and accents in my reports, so I want to add previously to the query "set name 'latin1';" but jasper doesn't work, that because when I run the query in phpmyadmin with this line it works.
The applicaton in php work fine, don't has a problem with the characters
Thanks
...
i got an answer to another question here:
http://stackoverflow.com/questions/3094495/db-schema-for-chats/3094915#3094915
it's a great answer, but i am not understanding the bit about references. i can do sql statements but i have never used references.
what are they used for?
how are they used?
give an example please
...
Specifically, I have a DB class that opens and closes multiple MySQL connections every time I call the Query function in the class. Should I open a connection once? or is it ok to open and close connections like this?
...
I am trying to create an index on a particular text string using Hibernate annotations. What I am currently doing is:
@Index(name="guid_index")
@Column(length=1400)
private String myGUID;
However, since the length of the column is 1400, this maps to SQL using the longtext type. hbm2ddl is able to create the table without mishap, but w...
The query below is not returning any results. I have copied it from a query that was working and the only thing different is the addition of the following condition:
WHERE submissionid=$submissionid
Any ideas why this query is not returning any results?
$sqlStr2 = "SELECT
s.loginid
,s.title
...
I have a select statement like this
select field1, field2
from table1
What I want is to have a newfield with only value "example".
newfield does not exist in the table, but when I run this query it kinda makes a virtual column with the values of example field.
...
I have the following mysql table called "pics", with the following fields and sample data:
id vehicle_id filename priority
1 45 a.jpg 4
2 45 b.jpg 1
3 56 f.jpg 4
4 67 cc.jpg 4
5 45 kt.jpg 3
6 67 gg.jpg 1
Is it p...
I have a field called 'sort_order' and it's bigint, i use it in my mysql queries for sorting.
Is it wise I put an index on it?
...
I have a web application that seems to like to make mysql work hard (cpu wise), as a result i want to establish how the performance of our application scales as we transition to more modern hardware, the current system has 2 cpu, and we could move it onto a grid system, but to find out if this is worthwhile i want to benchmark our applic...
This works with a mySQL backend
In the form...
<cfselect name="to" size="1" bind="cfc:cfcs.messages.getOrganisations()" bindonload="yes" value="organisationID" display="organisationName" required="Yes">
</cfselect>
in the cfc
<cffunction access="remote" name="getOrganisations" output="false" returntype="query" displayname="G...
Working on a current project I have encountered a strange issue. I have an html page that performs an AJAX call to a php file, passing a variable. The php file creates a SQL query using this variable, generates an XML file, and returns the result.
On my webserver this all works fine. However, when moved to a Windows 2003 IIS (permanent ...
I have a table with several thousand rows. I'd like to be able to take one of those rows and duplicate it into a new row. What is the best way to do this?
Should I grab the rows data and assign each field into a variable? And then take those variables and insert them into a new row?
So that'd be two queries -- is there a more effi...
Simple situation, two column table [ID, TEXT]. The Text column has 1-10 word phrases. 300,000 rows.
Running the query:
SELECT * FROM row
WHERE text LIKE '%word%'
...took 0.1 seconds. Ok.
So I created a 2nd column, the table now has: [ID, TEXT2, TEXT2]
I made TEXT2 = TEXT (using an UPDATE table SET TEXT2 = TEXT]
Then I run the q...
I want to add an additional functionality to a CMS I am making that will allow users to add content to a site via text message. The user should be able to upload an image and add text and send the message to a number which when received will update the database accordingly.
Can this be done, and can it be done via PHP because that's th...
I'm trying to rate Types of Fruit by the best possible rating given by users.
I have a Fruit table called Ratings just for submitting ratings with the following Information
Fruit_id int
From_ID int
Rating int
now I'm trying to run a SQL command like the following
select From_ID, AVG(Rating) AS Rating FROM Ratings Group BY `Fruit_ID`...
I have a MySQL database of promotional codes that are to be displayed to specific users based upon the range of the promo code that is stored in the database.
Table example: "promocodes"
Columns: id (int), promocode (varchar), lat(decimal), lon(decimal), range (int)
The lat/lon columns are the location of a store offering a promo code ...
hi all..i've a problem my database become no response..i'm using one page process for many form..last time it can works normally,where is my fault:
switch(postVar('action')) {
case 'newinputdata' : newinputdata(postVar('modelnm'),postVar('serialno'),postVar('faline'),postVar('shift'),postVar('insp_date'),postVar('range_sampl'),p...
I am trying to migrate the database layer of our framework from SQLServer to MySQL using MySql.data.dll . I have the following generated query in MySQL:
select * from `user` where `user_domainname` = 'domain\beth';
MySQL is interpreting the '\b' in the above string as an bell character whereas SqlServer does not interpret any such esc...
hello...
i am doing private chat concept. i want to alert beep sound when new user comes in. how to do? i am displaying every thing when new user comes in user details will comes at admin side. but at the same i want to alert beep sound when new user comes.
...