Tag Info

New answers tagged

1

I have this sinking feeling inside that you have a character set problem if you are using InnoDB. When you connect to MySQL, run this query select A.variable_name, A.variable_value global_value, B.variable_value session_value from ( select * from information_schema.global_variables where variable_name like 'collation%' ) A inner join ( ...


1

SELECT pg_database.datname as "Database", pg_user.usename as "postgres" FROM pg_database, pg_user WHERE pg_database.datdba = pg_user.usesysid UNION SELECT pg_database.datname as "Database", NULL as "postgres" FROM pg_database WHERE pg_database.datdba NOT IN (SELECT usesysid FROM pg_user) ORDER BY "Database" -- database that belong to user ...


2

This information is stored in pg_database: select datname from pg_database; Obviously you need to connect some database in order to be able to run the query.


0

by Unique constraint on your payment_method field, you can make sure that payment_method is unique. If the peyment_method is already exists, it will throw a SQL Error. Duplicate entry 'x' for key 'peyment_method' The SQL for that would be: ALTER TABLE YourTableName ADD UNIQUE (payment_method) But if you mean you need to make sure this payment_method ...


2

It depends on mode used (buffered/unbuffered), as explained in the PHP manual: Queries are using the buffered mode by default. This means that query results are immediately transferred from the MySQL Server to PHP and is then kept in the memory of the PHP process. This allows additional operations like counting the number of rows, and moving (seeking) ...


1

Now a little update: I tried mysqlenterprise.so for php 5.4, 5.5 and 5.6 and i'm sure it won't work cause it's a compatibility issue. In PHP Plugin Pack 3.0.22 there's only mysql-enterprise-plugin-1.0.1-php5.3 and unfortunately it works only on php 5.3. It caused by the change of php_body_write to php_output_write on PHPAPI main/output.c after 5.4 release. ...


4

You should have an IF ELSE in your for loop: for($i=0; $i<$fields_num; $i++) You are assigning $field to the string WATTAGE here: $field = mysql_fetch_field($result); echo "<th>{$field->name}</th>"; before you get to the code echo "<th>{$field->name}</th>"; if ($field ="WATTAGE") { CONTINUE; } WATTAGE has has ...


0

OK found the problem. Seems that after a power outage chrome restored a different session pointing to another server (copy of the one hosting all the sites but no master slave relation) and users used that since i found the data on the other server. The other server runs the same sites and db for testing purposes. Deleted user logins from the testing ...


0

SQL is very poor at manipulating/analysing and extracting information from your comma type schema. That schema is also a breach of Codd's rules Rule 2: The guaranteed access rule: All data must be accessible. This rule is essentially a restatement of the fundamental requirement for primary keys. It says that every individual scalar value in the ...


0

Weird behaviour. sql Just because the auto increments are "ok" it does not mean the data has not been deleted. According to http://stackoverflow.com/questions/970597/change-auto-increment-starting-number it can be changed via alter table. traffic That there were no traffic by the webpage is weird as users worked with the website. Is it possible that the ...


0

Since you have access to the server root, you should be able to find the config file for Wordpress. It will contain the address, database name, username and password for the MySQL server. Note that you might only be able to connect to it via a localhost, but PHPMyAdmin should help you out with that.


0

Yes, it is possible. However, it's highly discouraged! Unless the site is very simple, and has only one person contributing to it, you will experience issues. You should be looking at file_put_contents() and file_get_contents(), or perhaps file() for the proper functions for handling files. Using file handles directly is the old, and rather cumbersome ...


0

This is not a PHP error, but a MySQL error. Basically, as the error message says you're either not using the correct username, password or the user privileges haven't been flushed since you added the user. That is, I'm assuming that you've removed the username from the error message, and not trying to log in with an empty parameter. You need to check that ...



Top 50 recent answers are included