mysql

Wordpress (database); Show last modified date?

How can I show the last modified date, when my Mysql-database was updated? (I know there is plugin for showing latest modified date for post/pages, I want to do similar, but show when fields/metadata was updated) Thankful for answers" ...

How to get data from a mysql database using javascript?

If possible, how can I get (and post) data from a mysql database using javascript? I know I can use php and other languages, but I just need to know if this is possible with javascript? Thanks in advance. ...

MySQL - inform program that a duplicate INSERT was attempted

Is there an easy way to return something to your code if a duplicate insert is attempted? I want to do something like this (Obviously doesn't work because (ON DUPLICATE KEY INDEX UPDATE)- query = "INSERT INTO quotes(symbol, date, open, high, low, close, volume, adj)" query += "VALUES ('" + symbol + "', '" + Date + "','" + Open + "','" ...

How to fix odd value returned from select list populated by database

Using PHP I'm populating a dropdown list with values taken from a MySQL database. The list displays fine, my problem comes when I try to retrieve the selected value. I'm defining a variable and passing it the dropdownlist name for the POST array: $variable = $_POST['dropdownlist']; but the contents of $variable are \{value}" Why is i...

User security with .NET and mySQL

I feel like I'm kind of inventing the wheel all over but I haven't understood if I can use ASP.NET User Management with mySQL. Not sure if I want to either. I am designing a web site which requires user management. I use mySQL and .NET 4. Right now I've made a class Register which registers a user, but I am unsure how to protect the pas...

Correct form long time query executing myodbc syntax

I'm trying to build one SQL query for Access that links tables with myodbc connection to retrive the data from internet, but the time to finish the query is too long about five minutes, so I think the problem is with the query: SELECT COUNT([o].[orders_id]) AS howmany_orders, (SELECT SUM([op1].[products_quantity]) FROM orders_to...

Pagination script - getting data from two tables

I have a pagination script, which can be seen here: http://www.automotori6282.tk/phpsandbox/ This is the source code: http://pastebin.com/raw.php?i=63dCvfxD (PmcPagination.php) http://pastebin.com/raw.php?i=3k4nqwRB (demo.php, the page with the code in) and index.php for http://www.automotori6282.tk/phpsandbox/ simply uses PHP's incl...

Trigger limitation

This is related the answers those I received for my question. http://stackoverflow.com/questions/3156481/multiple-values-in-mysql-variable My Question is that the prepared statement suggested in that thread does not work in a trigger. Is it the limitation of triggers? Will it work if I write the prepared statement in a procedure and c...

mysql right join with group by problem

I have 2 tables: LandingPages - contain landing pages per campaign. Reports - contain hits and conversion per landing page. I try to do query that bring the sum of hits and conversion per landing page, But i want that if the landing page has not received any hits and conversion (and not show in reports table) then i want that return...

Mysql Update Records

I have to update one column from my user table . Current record in User Table **id , user_name** 1 , sachin rathore 2 , dilip CHOUHAN 3 , GariMA JAIN I want to update user_name column like this 1 , Sachin Rathore 2 , Dilip Chouhan 3 , Garima Jain User column should be in titlize form means first letter of each word should ...

mysql rbar situation

What would be the best way to handle this situation? I'm working on off the shelf software, and it is storing user defined field names in the database as a row instead of adding a new column to the table. It looks like this: ID fieldName fieldValue propertyId 1 latitude 23.192 id_property1 2 longitude -10.323 id_p...

how get get data from mysql server to xcode

hi all, i've been writing apps for about 8 months and have recently gotten interested in updating a database via myphpadmin and then retrieving the data to my application. more specifically, i developed a website that updates student attendance records, updated daily by the "teacher". i want the "parents" to be able to download my app...

What is Locking in MySQL and when would you use it?

What is Locking in MySQL (or any RDBMS) and when would you use it? A Layman explanation with a Example would be great! Thank you in advance;-) ...

When creating a trigger in MySQL, are there any alternatives to FOR EACH ROW?

I would like to create an after update trigger that runs only once even if multiple rows have been updated. ...

How can I access the mysql command line tool when using XAMPP in OS X?

I've got a vanilla install of XAMPP in OS X. How can I access the mysql command line tool? I've tried typing "mysql" at the command line, and it spits back "-bash: mysql: command not found". ...

a better approach than storing mysql password in plain text in config file?

It's always bothered me that many PHP programs require the user to store the mysql password in plain text (in a string or constant) in a configuration file in the application's root. Is there any better approach to this after all these years? So far I have come up with two minimal security boosts: make the file unreadable via the web...

get that rows, WHERE `DAYOFMONTH(<date>)` is devidable on 3?

I have a table in MYSQL DB with date field in YYYY-mm-dd format. i need to get that rows, DAYOFMONTH(<date>) is devidable on 3. Is it possible to do with mysql functions, or i have to write multiple OR conditions? :/ Thanks ...

pagination and row numbering

I wanna print a incresing number with each post. Like every forum has this. I currently use this: $i = 0; while ($post = mysql_fetch_assoc($rs)): $i++; Lets say i print 5 post per page This is what happens: #1 First post #2 2nd post #3 3rd post #4 4th post #5 5th post Then you go to page to 2 #1 6th post #2 7th post #3 8th post #...

Can I update two identical tables in with one query - mySQL

Can I update two identical tables with one query? TABLEA _____________________________ | id | value | |_____________|_____________| | 1 | a | | 2 | b | | 3 | c | | 4 | d | | 5 | e | |_____________|_____________| ...

How can I improve the performance of this query?

Recently I had this question, and everything worked properly until I sent it to my server at DreamHost. The query bellow seems to take too long to execute and I can't figure out why so many rows are processed at once. In my local server the same query was executed in 0.3 seconds. SELECT feed_entries . * FROM feed_entries WHERE id IN (...