Background: I need to setup a search engine for my classifieds site, which is PHP and Mysql based.
I have downloaded Zend Framework and have no clue what to do with it.
My webhosting provider says they don't support changing the php.ini file, and all tutorials I have found so far is based on changing that file.
I have found very little...
This is the second time that I've noticed this...
I am running my Zend Framework application on my laptop, but connecting to my remote database. It works fine most of the time (from home, and other places). But this is the second time that I get an error message from my application:
SQLSTATE[28000] [1045] Access denied for user 'databa...
Hello,
I am having an add/edit form to update and add to database, and I was not sure what the best way is to input TIME type (HH:MM:SS). Should I use multiple html text inputs for HH, MM, SS?
if so, is there a function that prepares the string for database input?
Basically what I'm trying to input is how many hours, minutes, seconds a...
I'm working on a catalog site where users can browse categories. Categories can contain other categories and products, and products can belong to more than one category. The relevant database schema looks something like this:
CREATE TABLE products (
product_id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
product_title VARC...
I've got a database site that will serve approximately 1,200 primary entries at launch, with the prospect of adding ~100 new entries per year. Each entry would be composed of ~20 basic values from the database, as well as a calculated average rating, and a variable amount of user comments.
The rating and comments output would have to be...
My app is highly data driven, and needs to be frequently updated. Currently the MySQL database is dumped to an xml file via PHP, and when the app loads it downloads this file. Then it loads all the values in to NSMutableArray's inside of a data manager class which can be accessed anywhere in the app.
Here is the issue, the XML file prod...
I have this issue on our production server. The application stack is,
Java Web App on Tomcat 6.0.18
iBatis data access layer
MySQL 5.0 database
CentOS
The system is deployed on virtual server having around 256 MB memory.
Real problem:
The query like,
select * from customer
executes in around 10 seconds however if the following q...
I'm trying to write a query that returns the user ID's of the top 10 users who gained the most points in the last 7 days on my web app.
I have three tables that, together, have the info I need.
votingapi_votes table. It has a record for every up/down vote on a comment or node.
node table. It can associate a node ID with a user ID so...
this is a mysql table
num wt
a 24
e 22
c 11
d 24
b 13
f 12
how can i create a mysql query which will display with descending order of weights and give random sorting to num with same weight . thus the select query can have two valid results
a 24
d 24
e 22
b 13
...
Hi,
select sum(viewcount) from video where id in(
select videoid from syndicatedvideos where videoid in (select syndicatedvideoid from syndicatedvideos where videoid=31)
union
select syndicatedvideoid from syndicatedvideos where videoid in (select syndicatedvideoid from syndicatedvideos where videoid=31)) or id in (31).
How can I opt...
how can i replace hardcoded number with variable in this java statement which is accessing the mysql datatabase using jdbc. the query is executed using executeQuery(query)
here is the java statement
String query = "select * from TableA where num = '1233' ";
i need to replace this 1233 with a variable in this statement.
any help app...
Previously, I have experience in doing the following database replication.
(1) I have 2 tables within 1 database in Machine A
(2) I update 2 tables in Machine A
(3) Machine A will replicate 2 tables to Machine B. Machine B will also contain 2 tables within 1 database.
Now, I would like to accomplish the following :
(1) I have Table ...
What is the MySQL equivalent statement of DBCC INPUTBUFFER(@@SPID), which lists the sql statement for current connection or specified connection?
...
I want to store an image in a MySQL database. I have created a table with a BLOB datatype, but now how do I store the image in this table?
...
hey i need a way to get a formated number from my column decimal(23,2) NOT NULL DEFAULT '0.00'
in php i could use this function number_format('1111.00', 2, ',', '.');
it would return 1.111,00 (in Germany we use , to define decimal numbers)
how would i do this in mysql? with string replaces?
...
I need a query to move a record from one table to another without using multiple statements?
Thanks
...
I have a PHP foreach loop and a mysql insert statement inside of it. The loop inserts data into my database. I've never ran into this issue before but what I think is happening is that the insert dies (I do not have an "or die" statement after the insert) when it reaches a duplicate record. Even though there may be duplicate records in t...
I am writing a data warehouse, using MySQL as the back-end. I need to partition a table based on two integer IDs and a name string. I have read (parts of) the mySQL documentation regarding partitioning, and it seems the most appropriate partitioning scheme in this scenario would be either a HASH or KEY partitioning.
I have elected for ...
Database one is called widgets, it has "id" and "title". Database two is called widget-layouts and it has "module-id", "widget-id", "position", and "weight".
What I am trying to do is check to see if widgets.id exists in widget-layout.widget-id and if it does, then does widget-layouts.position = 0. I also want to get the values of widge...
I want to update a table:
$result=mysql_query("select balance from tablename where userid='$userid")or die(mysql_error());
$row=mysql_fetch_assoc($result);
$accountbalance=$row['balance'];
if($accountbalance>$cost)
{
$result=mysql_query("update tablename set balance-'$cost' where userid='$userid")or die(mysql_error());
}
else {
...
}
...