I realized that i was using a varchar attribute as a index/key in a query, and that is killing my query performance. I am trying to look in my precienct table and get the integer ID, and then update my record in the household table with the new int FK, placed in a new column. this is the sql i have written thus far. but i am getting a
...
I know that database transactions are used to ensure all the statements in the transaction will be executed or none of them will.
But what about locking and thread safety, for example if I have an sproc which affects multiple tables and I use a transaction in that sproc, that sproc is called from different clients at the same time, will...
I'm using PHP with MySQL database. The PCs are having a network to each other. My problem is I want to connect to the MySQL database on another computer. I want to store data on that MySQL database from another computer. How could i possibly do on this? Thanks so much for any suggestions.
...
I have two tables. Posts and Replies. Think of posts as a blog entry while replies are the comments.
I want to display X number of posts and then the latest three comments for each of the posts.
My replies has a foreign key "post_id" which matches the "id" of every post.
I am trying to create a main page that has something along the...
I've had a lot of problems trying to get MySQL installed on my Mac, so I caved and installed MAMP.
MAMP sets its versions of Apache and MySQL to use ports 8888 and 8889. A lot of the MAMP tutorials (such as this one) mention that you should set MAMP's Apache and MySQL ports to their defaults of 80 and 3306, but they don't mention why (b...
Fatal error: Call to undefined function mysql_connect() in
/opt/lampp/htdocs/cake/cake/libs/model/datasources/dbo/dbo_mysql.php on line 370
//shell
<?php
class ReportShell extends Shell
{
var $uses = array('Customer');
function main()
{
$customers = $this->Customer->find('all');
var_dump($customers);...
I've been asked by a client to make an online tracking system for work we do for them (we will be typesetting a high volume of books for this client). Basically, it would be a database showing the books we are currently working on, with information on what stage of the project we are at, and estimated completion dates. The only people wi...
Hi,
Let be a table like this :
CREATE TABLE `amoreAgentTST01` (
`moname` char(64) NOT NULL DEFAULT '',
`updatetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`data` longblob,
PRIMARY KEY (`moname`,`updatetime`)
I have a query to find the oldest records for each distinct 'moname', but only if t...
I needed from my client updated information to fill a clients table.
I exported the table that i wanted to an excel file, and asked them to fill with the new information (it was only a column that i needed updated) and they've sent me back the file.
Now I want to import that information back to my table column.
Trial and error many tim...
In my question about searching for date ranges I tried simplifying the problem and inadvertently posed a different and simpler problem.
Rather than complicate that question with an edit I am going to ask the problem I actually intended.
I have two tables Property and Booking. Bookings have a foreign key to Properties and also start an...
Have a problem that seems easy on paper but i'm having a big problem figuring out how best to write a single query.
I have a table
CREATE TABLE `profile_values` (
`fid` int(10) unsigned NOT NULL default '0',
`uid` int(10) unsigned NOT NULL default '0',
`value` text,
PRIMARY KEY (`uid`,`fid`),
KEY `fid` (`fid`)...
I want to determine the size of my indexes, they are primary key indexes. This happens to be on mysql cluster but I don' think that is significant.
...
I have a MySQL InnoDB table on a RedHat Enterprise Linux 4 server, and after trying to import a database previously backed up using mysqldump I got a "the table is full" error.
The table currently has 463,062 rows in it, and the ibdata1 file on disk is currently 3.37Gb. A quick "SHOW VARIABLES;" shows that the innodb_data_file_path is ...
Hi,
I've got this error:
Fatal error: Uncaught exception 'MySQLiQuery_Exception' with message 'Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=': select id from 'addresses' where 'shiptozip'='13000' and 'shiptostreet'='Františka Křížka'
As you can see, I'm trying to get an ID from...
Okay I have two variables in PHP
$username;
$password;
which are initialized to the data retrieved from $_POST variable :)
I have this SQL query
$sql = "SELECT * FROM users WHERE username = '" . $username . "' AND password = '" . $password . "')";
But this doesn't works and returns me nothing :(
Can you instruct me into the right...
I'm designing a web application for a team that is currently tracking all of their data in a Microsoft Access database. The new database will be stored in mySQL, but I don't know enough about Microsoft Access to be certain that I'm doing things correctly.
Is there a tool or procedure that exists that will quickly create all the proper t...
I have user input strings specifying the cost of an event (eg: "$4 for non-members"). I am trying to parse out the upper (and lower) bound of the cost (in the example, upper == lower == 4.00).
Suppose that a given string cannot be parsed (maybe it's blank). In this case, I want to be able to store in the database that the maximum cost ...
Hi all,
I roamed the site for this question using the search engine, and I don't think it's out there. If it is, apologies in advance and feel free to point me to it.
Here is my scenario:
I am setting up a web application, Moodle if anyone is familiar with it, with Apache, MySQL, and php on Windows. Moodle supports enabling SSL for ...
I am looking for a hot backup system for mysql databases? I like to ask you for experiences and expertise.
...
Hi, I'm creating a movies website, IMDB.com like.. I'm really new to PHP and programming at all but I have some books and StackOverflow of course :)
I have already done lot of the work, but now I have more than 600 lines of code (PHO only) per page and more than 20 database tables only for storing and geting the movie data (many-to-many...