I am creating application for MAC using cocoa framework, I would like to know how and what are the ways i can connect to MySql database using cocoa framework.
I have a table in mysql with a row called 'newrelease'. If the item is a new release my form posts it as 'yes' if no 'no'.
How would i display all items that contain the data 'yes'?
$query = "SELECT * FROM movielist ORDER BY newrelease DESC LIMIT 4";
I am generating tables from classes in .NET and one problem is a class may have a field name key which is a reserved mysql keyword. How do i escape it in a create table statement? (Note: The other problem below is text must be a fixed size to be indexed/unique)
create table if not exists misc_info (
id INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL,
key TEXT UNIQUE NOT NULL,
value TEXT NOT NULL)ENGINE=INNODB;
I have a MySQL query that:
gets data from three tables linked by unique id's.
counts the number of games played in each category, from each user
and counts the number of games each user has played that fall under the "fps" category
It seems to me that this code could be a lot smaller. How would I go about making this query smaller. http://sqlfiddle.com/#!2/6d211/1
Any help is appreciated even if you just give me links to check out.
I am getting "ASCII encoding" errors when I insert into my database because I did a fresh install of the MYSQL.
I'd like to change the default to UTF-8 again.
How can i find out if there is transaction open in mySQL? I need to start new one if there is no transaction open, but i don't want to start new one if there is one running, because that would commit that running transaction.
This question already has an answer here:
MySQL command appends '@localhost' to username
1 answer
Mysql - Access denied for user 'root'@'x.x.x.x' [duplicate]
7 answers
root@test-2:/usr/local# mysql -u root -H 192.168.x.xxx -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
When stepping through a script in MySQL Query Browser's script window, is there any way to view the value of a variable I have just assigned?
Specifically I do an update on one line, and then:
SET @Num=row_count();
While debugging the script, I would like to be able to know the value of @Num
Hello, in my web page a user fill a form who send information to a MySql database. One of the data inputs sent is a date/time, in the format date('l jS \of F Y h:i:s A');
(I can change the format as needed)
So when the user submits the form i wanna check if the actual time/date is 30 seconds more than the sent time/date in order to allow or not the submission of the form. Thanks!
Hi everybody,
Is there a "known limit" for columns & rows in a mySQL table that when passed, it can be safe to say that performance is severely affected?
I've think that I had heard that there is a "golden number" that you really dont want to exceed in either columns or rows in a table. - Or is it all about the size of the index and available RAM + CPU on the server?
Thanks!
I have a keyword field with a list of 5 keywords for each item. example below:
2008, Honda, Accord, Used, Car
Will MySQL full text return the item above for the following search requests?
2008 Honda Accord
Honda Accord
Used Car
If so, how well will this hold up when searching through fifty thousand plus records?
What are the most efficient SQL queries that would take an existing MySQL table and re-sort it by one of the columns? Not a selection, but the whole table should be sorted by one column. Somehow using a temporary table, I guess, but what's the best way?
I would like to pass a MYSQL query via Coldfusion the following date: 03/13/2010
So the query filters against it like so:
SELECT *
FROM myTable
WHERE dateAdded before or on 03/13/2010
I'd also like to be able to take 2 dates as ranges, from: 01/11/2000, to: 03/13/2010
SELECT *
FROMT myTable
WHERE dateAdded is ON or Between 01/11/2000 through 03/13/2010
thanks
is there a way to insert pics(not url,the pic)into a MYSQL table made with phpmyadmin?
and if there is when i want to get that picture and insert it in the page , what should i do? :)
How do i decrypt an aes encryted column when using flash/flex to display the table data?
adobe flex connected using php connection class to mysql
for php, we would use aes_decrypt()
however i am not sure how i can get flex to do this.
I'm just getting my head around java (and OOP for that matter), the only thing I am familiar with is MySQL. I need to keep the DB connection open throughout the duration of the application, as well as a server socket.
I'm not even sure if they both need separate classes, but here's what I have so far:
http://pastebin.com/qzMFFTrY
(it wouldn't all go in a code tag)
The variable I need is con for line 86.
I'm very surprised that it seems impossible to upload more than a few megabytes of data to mysql database through PHPMyAdmin whereas I can upload a msaccess table easily up to 2 Gigabytes.
So is there any script in php or anything that can allow to do so unlike phpmyadmin ?
Suppose I have a datetime column in MySQL.
How do I select all that have a datetime within 2500 seconds of the current datetime?
SELECT ALL where current_datetime - that_datetime < 2500 ...
This is part two of the question: http://stackoverflow.com/questions/2913639/mysql-make-this-query-faster-theres-a-way
this query still run slowly:
SELECT b.id,
b.name,
c.name
FROM bookcorr as a JOIN books as b on b.id = a.books_id =
JOIN Library as c on c.id = a.library_id
WHERE a.category_id = '2521'
AND a.library_id = '4983'
ORDER BY b.name ASC LIMIT 0,15
Any suggest ?
How do you query a MySQL table columns highest entry and store it in a variable. Here is what I have but it is not working.
$query = "SELECT MAX(date) FROM Records WHERE ips='$currentip'";
$result = mysql_query($query) or die(mysql_error());
echo $result;
I'm managing the MySQL database from PHP scripts.
the communication between server and client is secured via SSL.
I store user account data which is sensitive.
Is there a way to encrypt this data when entered into the DB?
What is the best way to protect this sensitive data?
Thanks
Hi friends,
I need to store image and resume of user in the data base.
I am using mysql data base and php5. I need to know which data types I should use.
And also how do I set a limit (maximum size) for uploaded data.
I want to use MySQL to store a bunch of admin settings - what's the best way to structure the table?
Like this?
Setting _|_ Value
setting1 | a
setting2 | b
setting3 | c
setting4 | d
setting5 | e
Or like this?
|--------|_setting1_|_setting2_|_setting3_|_setting4_|_setting5_|
Settings | a | b | c | d | e |
Or maybe some other way?