Is there any limit to maximum row of table in DBMS (specially MySQL)?
I want create table for saving logfile and it's row increase so fast I want know what shoud I do to prevent any problem.
which database should I use, if my application is going to be in multiple languages (including Chinese, Japanese etc)? In other words, is MySQL better or worse than Postgres to handle unicode etc? (these are the only two databases my hosting company has)
Also, which language is better for handling unicode? PHP or Ruby/Rails?
SELECT 1 FROM (SELECT 1 FROM table) q
does not working on my local server. it returns totally nothing (no error or empty table).
But SELECT 1 FROM table is ok.
What is wrong with it? is there any MySQL option for such queries?
Hey all
Are there any pre-made scripts that I can use for PHP / MySQL to prevent server-side scripting and JS injections?
I know about the typical functions such as htmlentities, special characters, string replace etc. but is there a simple bit of code or a function that is a failsafe for everything?
Any ideas would be great. Many thanks :)
I try to install Wordpress in a Windows Client with WebPI which provided by Microsoft.
Everything installed in my client and finally I saw successful message. with a lunch application link. When I click on it I see following error.
Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
How Can I resolve this issue
hello
I'm new to PHP and I recently started learning Zend Framework. What DAL are you using? Do you think that Zend_Db_* can do the magic? I need it mainly for MySql db. Does it have any limitations and can I use it in big project without any problems because I don't want to go the wrong way.
10x
Hi
I have created a project that uses mysql stored procedures and views.
I have a lot of difficulties to find a hosting service that would support them.
Do you know where I can go?
thank you.
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?
In my experience I have used many queries like select, order by, where clause etc.. in mysql, sql-server, oracle etc
For a moment i have thought,
1)how is this internally written to implement the above queries
2) which language do they use?
3) is that programming language? if yes which language?
4)what kind of environment required to implement this kind of complex database
Is there a way to specify the database engine to be used for fixtures in CakePHP test fixtures? Some of my models depend on database transactions, and I would like to write some tests for their correct behavior. Currently I'm simply auto-importing the schema, but the tables get created with MySQL's standard MyISAM engine, which doesn't support transactions.
class FooFixture extends CakeTestFixture {
public $name = 'Foo';
public $import = 'Foo';
public $records = array(...);
}
I am trying to import a .csv file into a MySQL table via phpMyAdmin.
The .csv file is separated by pipes, formated like this:
data|d'ata|d'a"ta|dat"a|
data|"da"ta|data|da't'a|
dat'a|data|da"ta"|da'ta|
The data contains quotes. I have no control over the format in which I recieve the data -- it is generated by a third party.
The problem comes when there is a | followed by a double quote. I always get an "invalid field count in CSV input on line N" error.
I am uploading the file from the import page, using Latin1, CSV, terminated by |, separated by ".
I would like to just change the "enclosed by" character, but I keep getting "Invalid parameter for CSV import: Fields enclosed by". I have tried various characters with no success.
How can I tell MySQL to accept this format in phpMyAdmin?
Setting up these tables is the first step in writing a program that will use uploaded gzipped .csv files to maintain the catalog of an e-commerce site.
Hi,
For example I made a reservation for a restaurant and it expires in 24 hours. In the reservation table of the db (MySQL), how do I automatically update the status to expired after 24 hours? What approach would you guys suggest? Thanks in advance!
I am trying to create a conversations based messaging system.
I want to group all messages that have the same conversation_id so that when I display a list of current conversations you only see the latest message from each conversation.
Can I group the values in the mysql query, or would I have to do it in the php?
I have a table where each row has a start and stop date-time. These can be arbitrarily short or long spans.
I want to query the sum duration of the intersection of all rows with two start and stop date-times.
How can you do this in MySQL?
Or do you have to select the rows that intersect the query start and stop times, then calculate the actual overlap of each row and sum it client-side?
Hello,
i got a MySql DB.
There is a table with products and orders.
Structure:
Products: product_id, name, manufacturers_id
Orders: orders_id, product_id, quantitiy
Now I want to get all orders (show only products where product id=1).
I tried:
SELECT
orders.orders_id,
orders.product_od
FROM products, orders
WHERE products.manufacturers_id = 1
GROUP BY orders_id
ORDER BY orders_id
But this doesnt work
I'm already familiar with how to use onSubmit to evaluate form content against RegEx to ensure it meets static parameters for acceptable content. What I'm wondering is if there is a way to further provide validation against a MySQL database, such as if you want to make sure an e-mail address hasn't been used yet before submitting a form and having to re-load the field data back into the proper places for correction.
I know that with an InnoDB table, transactions are autocommit, however I understand that to mean for a single statement? For example, I want to check if a user exists in a table, and then if it doesn't, create it. However there lies a race condition. I believe using a transaction prior to doing the select, will ensure that the table remains untouched until the subsequent insert, and the transaction is committed. How can you do this with MySQLdb and Python?
I have read many strong views (both for and against) SPs or DS.
I am writing a query engine in C++ (mySQL backend for now, though I may decide to go with a C++ ORM). I cant decide whether to write a SP, or to dynamically creat the SQL and send the query to the db engine.#
Any tips on how to decide?
Hi
I've 2 mysql select statements, suppose these are my queries & their result :
Statement 1 :
select id from a
which returns this result set : { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }
Statement 2 :
select id from b
which returns this result set : { 3, 5, 10 }
I want to write a query which determines whether resultset1 contains all records of resultset2 or not. I think needs a simple query, any suggestion ???
I am in late testing phase of my web application. The application will be tested at a larger scale now.
During this time I want to try and hack my own system and application with some tools, scripts, etc. Mostly some code I can try and execute in the browser. I have backups for the whole system so even down to the kernel can be hacked.
My system is nginx,apache,php,mysql on Linux CentOS.
Hi, i have this string in my utf-8 mysql DB:
"Pruebá de eñes"
When i print it like plain text, everything works ok, but if i load that same field inside an input, textarea, etc, it becomes: "Pruebá de eñes"
How can i solve this problem? =(
Hello guys,
I have done some searching but really haven't found what I'm looking for. What I would like to do is generate a random BUT unique 5 digit number and push whatever number into an img tag on my page.
For example when people come to my page this number would generate and get pushed into this image tag:
<img src="http://www.sample.com?randomNUM=12345" height="1" width="1" />
I have a mySQL DB and am looking to do this in PHP.
Thank,
Matt
Maybe it's a little dumb, but i'm just not sure what is better.
If i have to check about 30k rows in db for existanse, what i'd do?
#1 - one query
select id from table1 where name in (smth1,smth2...{till 30k})
#2 - many queries
select id from table1 where name=smth1
Though, perfomance is not the goal, i don't want to go down with mysql either ;)
Maybe, any other solutions will be more suitable...
Thanks.