When I call mysqli_field_type it returns a number, which I assume relates to the type. Does anyone have a list of types and their corresponding numbers?
I am in particular trying to find out if the data type is numerical or text (if that makes a difference).
...
Hi!
I am trying to move my site from mysql to postgres, I don't know how to do it. Already dumped my mysql database with compatible option. But it's impossible to import the data directly. I wonder if there is a free tool, with GUI to do it
I already tried several perl scripts but they appears to be buggy (no one helped)
:(
...
Today one of my websites started showing
Error Number: 2006
MySQL server has gone away
It's a low-traffic client site running under Apache 2.2.9 (Debian), PHP 5.2.6-1+lenny3 (using CodeIgniter 1.7.1 framework) and MySQL 5.0.51a. I obviously reasearched about the error but all the possible solutions imply that there are big queries goin...
We have a MySQL table that was altered with
ALTER TABLE t COMMENT 'foo'
we later realize that we don't want that comment. Is there a way to delete it?
simply saying
ALTER TABLE t COMMENT 'NOT foo'
simply adds an additional comment, so that when you do a SHOW CREATE TABLE t it shows BOTH comments...
ETA:
AH, the problem seem...
I have a mySQL table of users whose primary key is an auto-incrementing integer. The table is already populated with records whose key is between 0 and 30.000. Not all records are there, though. Some users have been removed and therefore I have "holes".
Now the client has realised they removed a bunch of users by mistake, and they now w...
I have 2 tables, defined as such:
CREATE TABLE `product` (
`pid` SMALLINT( 5 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
`name` VARCHAR( 50 ) NOT NULL,
`description` TEXT,
`qty` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT '0',
`category` ENUM( '1', '2', '3', '4', '5', '6', '7', '8' ) NOT NULL DEFAULT '1',
`price` DECIMAL( 7, 2 ) UNSIGNE...
Any idea on how to save an array of unsigned char to a field in MySQL database ? I'm considering BLOB, but how can I convert it to QByteArray and convert it back to an array of unsigned char when I want to ? BTW, I'm trying to save fingerprint data.
...
I have the following query:
SELECT m.*, COUNT(c.chapter_nr) as chapters, MAX(c.chapter_nr) as latest_chapter
FROM comic_series AS m
JOIN chapters as c on c.comic_id = m.id
WHERE m.title_en = 'test'
This allows to me to find the chapters from a comic book by just giving the name of the comic. The query selects all the columns from the ...
I have a huge table and I need to process all rows in it. I'm always getting this Lost connection message and I'm not able to reconnect and restore the cursor to the last position it was. This is basically the code I have here:
#
import MySQLdb
class DB:
conn = None
def connect(self):
self.conn = MySQLdb.connect('hostname', 'u...
I use the following statement to create a percentage calculation in a view:
round(((Surveys.RejectedAsAdvertising / Surveys.Responses) * 100),0) AS PercentageAdvertising
Basically, I divide the number of responses to a certain question (in this case, is something considered to be advertising) by the total number of responses.
In the e...
I have 100 tables, 40,000 rows in each table. I want to go into MySQL and delete all rows from all tables.
...in 1 statement, if possible?
I want to keep the database and tables.
...
What's the difference between VARCHAR and CHAR in MySQL?
I am trying to store MD5 hashes.
...
I am in dilemma situation. I am not sure if its a good idea to separate the users table. I notice my game highscores table performances, as the numbers growing, the loading is getting slower and slower.
My current users table store all users, which currently about 10k users. I am thinking of splitting the users table (for future) into l...
i want to save logged in users actions so when they visit the page again they don't have to do the same thing again eg. what list values they chose or what page they were on before they logged out.
i dont want to save it as cookies because i want them to be unchanged even if he switch computer. should i save these kind of information in...
In my database(mysql), I have a table which has 50k data(rows/records).
I do a test using firebug, after playing the game, the call to load_score.php and save_score.php is around 380ms (millisecond).
The save_score.php just a normal inserting, nothing much. The load_score.php, I use this query:
SELECT name, score
FROM `highscores`
WH...
mysql_query("insert into mytable (flow,holderid,amount,operator,ip,product,taskid,comment)values('-1','$memberid','$sum+5','$memberid','$ip','Expertise','$taskid','Publish a problem or task') ")or die(mysql_error());
I get an error about
'$sum+5'
MySQL doesn't treat it as an and operation, how to resolve this problem?
...
I can not use MySQL. MySQL is on my local computer. Currently I added skip-grant-tables in My.ini so I can use MySQL. But I have no privilege to create a new database. My problem is tough, although I asked related questions on SO, but no answer can resolve my problem. I almost give up. So I lower my expectation. I am developing a website...
I'm very new to PHP and am having some trouble. I have a form using HTML which is action=.php method=post
The form is using text boxes and select options, I'm not sure if it makes a difference in sqldatabase. I've tried about 30 different combinations of this script and can only get a connect successfully message but nothing is posted....
Hi guys,
My website is developed with ruby on rails 2.0.2.
So I want to update this version to 2.3.5.
Unfortunately, the new rails version doesn't include mysql so I install the mysql gem like this tutorial said => install rails
But and it's my problem, when I launch my server (webrick), mysql crash (segmentation fault).
I don't find ...
Basically when do we need a self join on a table?
...