There are many conflicting statements around, what is the best way to row count using PDO in PHP with MySQL? Before using PDO I just simply used mysql_num_rows.
FetchAll is something I won't want as I may sometimes be dealing with large datasets, so not good for my use.
Any suggestions?
...
I'm working on a SaaS project and mysql is our main database. Our applications is written on c# .net and runs under an windows 2003 server.
Considering maintainance, cost, options and performance, which server plattaform can I decide for MySQL hosting, windows or Unix/Linux/Ubuntu/Debian?
The scenario is as following:
The server I ru...
Hello.
I need to get values from selected checkboxe's and pass that values through pagination witch is done by php/mysql. And if on another page user select other checkboxes add their values to array of earlier seleced.
I need this for product compare page. In short i get checkbox values store them add checkbox values from other pages ...
Often when I define a View in Navicat I receive the following message:
xxx does not have a primary key. Updates to this table will be done using the following pseudo statement: UPDATE xxx SET ModifiedFieldsAndValues WHERE AllFieldsAndOldValues LIMIT 1
Obviously I only use my Views for viewing data, not updating. But this did make m...
Here's the query (the largest table has about 40,000 rows)
SELECT
Course.CourseID,
Course.Description,
UserCourse.UserID,
UserCourse.TimeAllowed,
UserCourse.CreatedOn,
UserCourse.PassedOn,
UserCourse.IssuedOn,
C.LessonCnt
FROM
UserCourse
INNER JOIN
Course
USING(CourseID)
INNER JOIN
(
SELECT CourseID, COUNT(*) AS Le...
We have a large tab-delimited text file (approximately 120,000 records, 50MB) that we're trying to shove into MySQL using mysqlimport. Some fields are enclosed in double-quotes, some not. We're using the fields-optionally-enclosed-by='\"' switch, but the problem is some of the field values themselves contain double-quotes (indicating i...
I built a webpage where users can submit a PDF which is then inserted into a MySQL database in a mediumblob for retrieval later.
This all works fine, except when the PDF contains images or embedded fonts, in which case the images are corrupted and any text using the font disappears (Acrobat display a message about the missing font).
I'...
May be this question has been answered before but I couldn't find it.
I am using a 2/3 yr old MySQL database which has hyphens in its column names. When I try to use these names from my Java code, the names are broken at the hyphen (e.g. air_port becomes air) and thus are not found. I tried replacing hyphens to underscores in my code ho...
What would be the easiest way to take a Outlook pst file and export all of the emails into a MySQL database?
...
I know asp.net with mySQL is possible, but does it work well (fast and stable)? I am looking at a project for a client, they want to stay on mySQL, but they like they idea of going to asp.net from PHP. I can give them a better price by far in asp.net (more productive for me) and keep the project within their budget.
BUT, am I going to r...
MySQL has a RENAME TABLE statemnt that will allow you to change the name of a table.
The manual mentions
The rename operation is done atomically, which means that no other session can
access any of the tables while the rename is running
The manual does not (to my knowedge) state how this renaming is accomplished. Is an enti...
Hi,
I have a table with a foreign key, status, code
I would like to select the groups with the same foreign key
with one record having a code of 001 and status of 'incomplete'
and all the rest HAS to have a status of 'completed'
id foreignkey code status
------------------------------------------...
I've got a few backups of my database, and I'm trying to figure out if there is a way to compare the data in the backups to see how the data as changed over time.
I do not have a timestamp on the fields I want to compare, but I do have a unique id on the row. The backups are .sql files created by using mysqldump.
Is there a process fo...
I need to run a specific mysql query upon wget, which is running in the background, finishes downloading a file. For example...
wget http://domain/file.zip
then run:
UPDATE table SET status = 'live' WHERE id = '1234'
How would I go about doing this?
...
I'm having a problem with my mysql php code. The code is meant to search the data base with variables inputted by the user and bring up the corresponding results. For example if I searched for only colour photos only colour photos would be listed with the name of the artist, size etc. But I am getting an error message and I don't underst...
I have multiple mysql databases and I want to perform some administration tasks on a particular database. How do I ensure that no one else can connect to that database while the tasks in progress?
...
whenever i set a Resource limits for particular user/database/host does it spread through the hour? it'll delay queries or does it won't allow you to query would throw some sort of an error or something?
...
I had trouble using InnoDB MySQL 5.0 on OS X because of a my.cnf settings issue. Listing the gotchas in case it helps anyone:
If InnoDB is disabled, check the error log (hostname.err, in the data directory). I had an empty setting which I changed:
innodb_data_file_path = ibdata1:10M:autoextend
Hope this helps someone. I was running ...
I'm using MySQL and have the following entity:
class MyEntity {
@Id
@GeneratedValue(strategy=IDENTITY)
@Column(name="id")
private Integer id;
}
However, I would still like to be able to set the id manually!
The problem is that INSERT will never insert the id column. E.g., when
doing this:
MyEntity e = new MyEntity();...
Hi All,
I am trying to check if a regulation's date reminder is today and regulation's date end not yet passed
then I do not want it to display. the problem is the query that I made isn't work in mysql. Can anyone help me to revise my query?
Here is my query:
$query="select * from t_regulation where dt_reminder >= '$today' and dt_e...