mysql

accessing the jquery function after success call?

jQuery(function ($) { /* fetch elements and stop form event */ $("form.follow-form").submit(function (e) { /* stop event */ e.preventDefault(); /* "on request" */ $(this).find('i').addClass('active'); /* send ajax request */ $.post('listen.php', { followID: $(this).find('input').val()...

Perl Compare dates with MySQL

I'm struggling to figure out how to compare MySQL dates with current system time using perl. I have a script that runs on a cron job that will send notification if the current system date/time is past the date/time of a returned record: An application displays a table view: EventId Device Location CC: 123 something B...

What's the best way to implement a rank field in a database?

Suppose you have a table where you store the musical preferences of people, and you'd like to give users the ability to rank their preferences. At the time of insertion, the rank field should be calculated automatically. Later, however, the user should have the ability to edit his rankings. id, memberid, trackid, rank EDIT: It appears ...

Creating an AssociationSetMapping for MySQL with the Entity Framework Designer?

I am trying to build an Entity Framework model for my database schema using EF4 and Visual Studio 2010. Since I am stuck using MySQL as our database (for now), I pretty quickly discovered that since MYISAM tables don't support foreign key constraints, the designer does not have any way to automatically create all the associations for you...

Creating a new many-to-many table

I have a database Class_Books which links ISBNs (from Books table) to Class_ID's (from Classes table). I'm changing my Books table so the primary key is a Book_ID (autoincrement INT) instead of the ISBN. Is there a way to update Class_Books so it uses Book_ID now? ...

looking for full project, graphic tutorials for php and web programming(example inside)

hello, im looking for graphic site tutorials like this one: http://net.tutsplus.com/tutorials/php/creating-a-web-poll-with-php/ that give you step by step explanations for a full project, with the final result and some pictures for each step. i found some other sites, consisting mostly with text for project tutorials and for some reason...

MySQL Users table separation (Ruby on Rails and Authlogic)

I was wondering if it would be better to have things like perishable_token (used for account validation and resetting of passwords), banned (boolean to check if the user is banned), email_verified (boolean to check if user's email has been verified) in a separate table in the database, as it will rarely ever be used. Also, I have my app...

One-to-many table setup

I have a table where I have to relate groups of primary keys to one another. There is no information about these groups other than that they exist. Specifically, I am storing groups of Editions of Books together, so I can know that a certain set of books are editions of each other. I currently have a setup where I have an Edition_Group_...

MySQL Support VSS (Volume Shadow Copy)??

Hi, I know that MS SQL supports VSS. But does MySQL support VSS too?? Thanks Kevin ...

In MySQL, how to write an INSERT-INTO-VALUES query so that it to be silently discarded if a record with same primary key value already exists?

I have to import a large set of records which can contain duplicates. The table is a MyISAM table with a composite primary key and no foreign keys. How do I specify that if a primary key values combination of a record being inserted already exists in the table, it will just discard the particular insert without throwing an error or inser...

.finding on a method in ActiveRecord

I'm using ActiveRecord and Ruby (outside of Rails) to track some statistics. I added a method (total_cost) to one of my models to do calculations using a couple of the columns in the current model as well as a column from another model. I'd really like to be able to use some of ActiveRecord's provisions for math (averaging, sums) and ...

jquery ajax problem?

<form class="follow-form" method="post" action="listen.php"> <input name="followID" value="123456" type="hidden"> <button type="submit" value="Actions" class="btn follow" title="123456"> <i></i><span>follow</span> </button> </form> javascript file: jQuery(function ($) { /* fetch elements and stop form eve...

Mysql Replication- Master-bin log files are not updated

Hi Everyone, I am new in Mysql Replication, My problem is : When i Give SHOW SLAVE STATUS Command on Slave, Master-bin-log files are not updated, i reset it and update the Master-bin-log file with the command CHANGE MASTER TO MASTER , still master-bin-log files are not updated when i check with the SHOW SLAVE STATUS command. Addition...

mysql timestamp updates when record is amended

Hi there, I raised a question about this a while ago but I'm still having an issue. I have a mysql5 database with a sales table that contains a timestamp to represent a sale. If a field in the sales table in amended or altered the timestamp updates to the current time (the time of the change). To prevent this I have unselected the on_up...

Multiple Web Development Environments on Windows

Beginner here, stuck wondering what I need to do to learn development in different web environments. Say, for instance I want to play around in PHP & MySQL. But I also want to try things with Ruby on Rails and maybe even server things with Python. Do I need a different environment for each platform? Am I required to have a virtual ma...

javascript, mysql database and escaping 'weird' characters

Hey there. On my website visitors can do some inline editing. I use ajax for it with a MySQL database and PHP. I expect the Dutch language to be used on the website. My challenge is to get the character encoding to work well. I could use advice on: the database (do i use utf-8? latin1_swedish_ci) the tables in the database (i'...

Notify user his password has been changed via text message on the same page (with PHP or AJAX?)

Hi guys, Here is the scenario. A user wants to change his password. So he login and fill up his new desired password and clicked submit. Back end PHP checks his codes and updated it in MySQL database. User is brought back to the same page (with the form) and is notified by this small paragraph sitting on the top of the page that his pas...

Inserting a datetime value from php into MySQL

Hello, I have a column with datetime datatype called 'updated_at' in a mysql table,where i want the current date and time.Im trying to insert a record into the mysql table from php,as follows: mysql_query("INSERT INTO my_table (service_name,service_status,service_comment,user_name,updated_at) VALUES($service_name,$service_status,$servi...

problems installing sqlite3-rubygem and mysql

I have recently updated my mac to snow leopard and am having a terrible time configuring it for rails development. I have followed the tutorial at hivelogic (http://hivelogic.com/articles/compiling-ruby-rubygems-and-rails-on-snow-leopard) and am being returned with the following error. I have also attempted to install sqlite3-ruby gem an...

Selecting PHP Combo Box and Button

Hi There! I am currently using PHP 5 with a MysSQL database with 2 tables. So far my PHP Combo Box is working however I need to access the values selected from the combo box. it goes like this: 1) I select a value from the Combo Box. 2) I click on the Submit button 3) The Submit button brings me to another webpage. The problem that my ...