I am using MySQL to manage session data for my PHP application. When testing the app, it is usually very quick and responsive. However, seemingly randomly the response will stall before finally completing after a few seconds. I have narrowed the problem down to the session write query which looks something like this:
INSERT INTO Session...
I have a web application written in PHP using MySQL that I would like to test to see how many users it can handle, how much activity, etc.
What method should I use to do this?
...
SELECT bp.*,r.rating,COUNT(r.review_for),bp.business_name,bp.profile_member
FROM ibf_business_reviews r
LEFT JOIN ibf_business_profiles bp ON ( r.review_for=bp.profile_member )
WHERE bp.sub_category LIKE '%{$id},%'{$location_sql}
GROUP BY r.review_for HAVING COUNT(r.review_for) >=1
ORDER BY r.date_posted DESC LIMIT 0,2...
Hi there,
I am trying to investigate the reasons for some mysterious load spikes on a Linux Apache server (2.2.14) running PHP 5.2.9 on a dedicated server with enough processing power and memory. My primary web application is a Wordpress MU (2.9.2) installation.
I have investigated and ruled out DOS attack, MySQL or Apache configuratio...
hi
i have to determine stopped time of an vehicle that send back to server its status data every 30 second and this data store in a table of database,
the fields of a status record consist of (vehicleID,RecieveDate,RecieveTime,Speed,Location).
now what i want to do is, determine each suspention time at the point that vehicle spee...
OK so here's the code:
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
public class Main {
public static void main(String[] args) {
try {
URL my_url = new URL("http://www.viralpatel.net/blogs/");
BufferedReader br = new BufferedReader(new InputStreamReader(my_url...
EDIT 2
I have two tables reports and holidays.
reports: (username varchar(30),activity varchar(30),hours int(3),report_date date)
holidays: (holiday_name varchar(30), holiday_date date)
select * from reports gives
+----------+-----------+---------+------------+
| username | activity | hours | date |
+----------+--------...
I have a table with separate columns for months, days and a varchar column for 6 hour increments for each day ('12AM', '6AM', '12PM', '6PM'). There's also a column that's supposed to have calculated numeric values for each of those 6 hour increments. These calculated values come from some reference table. This reference table contains va...
i want to make charts system
and i think it must be like that
1 jan 2009 = 10 post
2 jan 2009 = 2 post
4 jan 2009 = 10 post
6 jan 2009 = 60 post
and i have posts table that has id,user_id,date
how i can select from posts to show it like that
...
I am using mysqldump to take backup of my database, but the command is not working..
the command i am using is mysqldump -u root dbname> 'c:\backupdatafolder\backup.sql'
i am running this command in MySQL cli but not running,..is there any thing wrong in the command?
...
I've run the following query:
UPDATE main_table, reference_table
SET main_table.calc_column =
(CASE WHEN main_table.incr = "6AM"
THEN reference_table.col1+reference_table.col2+...
WHEN main_table.incr = "12AM"
THEN reference_table.col7+reference_table.col8+...
WHEN main_table.incr = "...
As we all know, By default in PHP+MySQL, we can upload a file of size 1.4MB (max).
1) My Question is how can i increase the limitation of this uploading file size?
2) What is the maximum limitation for file to be uploaded in database?
Thanx for viewing my query and special thanx for answering my questin.
...
I need to be able to connect to an MDB-file in a LAMP-environment (running on Linux) and ultimately insert converted data into a Mysql db.
The data I need to access is stored
as a BLOB (Long Binary Data according
to Access) in the MDB file. I have
not yet been able to actually have a
look at the data but I have been told
that the BLOB ...
Hi,
I am wanting to insert a datetime into a MySql data base using Java and a prepared statement:
Calendar cal = Calendar.getInstance();
PreparedStatement stmnt = db.PreparedStatement("INSERT INTO Run " +
"(Time) VALUE (?) ");
stmnt.setDate(1, new java.sql.Date(cal.getTime()));
stmnt.executeQuery();
N...
Hello,
tried connecting to mysql server in realbasic using the folowing code:
dim db as MySQLCommunityServer
db=New MySQLCommunityServer
db.host="192.168.240.129"
db.port=3306
db.databaseName="test"
db.userName="test"
db.Password="test"
If db.Connect() then
txt1.Text = "Connected"
else
txt1.Text = "Connection ...
Can any one please let me know, that, i need to fetch last 4 rows from a result-set using mysql. The result-set returns totally 6 records.
but, i need the records to be fetch from last4...i.e,
Record-3
Record-4
Record-5
Record-6
...
I have some set of SQL queries which is in a file(i.e query.sql), and i want to run those queries in files using PHP, the code that i have wrote is not working,
//database config's...
$file_name="query.sql";
$query=file($file_name);
$array_length=count($query);
for($i=0;$i<$array_length;$i++)
{
$data .= $query[$i];
}
echo $data; ...
I am putting together a web page which is quite 'expensive' in terms of database hits. I don't want to start optimizing at this stage - though with me trying to hit a deadline, I may end up not optimizing at all.
Currently the page requires 18 (that's right eighteen) hits to the db. I am already using joins, and some of the queries are ...
I am pretty new in SQL so this may be a stupid question...
I have a form in PHP which fills in few fields in my SQL table. I have this code:
$sql="INSERT INTO $tbl_name
(app_name, app_path, short_desc, full_desc)
VALUES ('$_POST[app_name]', '$_POST[app_path]',
'$_POST[short_desc]', '$_POST[full_desc]')";
But even app_name and app_pat...
This is for an upcoming project. I have two tables - first one keeps tracks of photos, and the second one keeps track of the photo's rank
Photos:
+-------+-----------+------------------+
| id | photo | current_rank |
+-------+-----------+------------------+
| 1 | apple | 5 |
| 2 | orange | 9 ...