Search Results

Search found 15376 results on 616 pages for 'mysql triggers'.

Page 124/616 | < Previous Page | 120 121 122 123 124 125 126 127 128 129 130 131  | Next Page >

  • Mysql - NOW() function calling

    - by Ockonal
    Hello, I'm using php for making queries for mysql. Here is one: UPDATE `subscribers` SET `curDate` = NOW() WHERE `e_mail` = "$resEmail" curDate - DateTime type. The problem is that after this query curDate of given email is 0000-00-00 00:00:00 What's wrong?

    Read the article

  • How do you debug MySQL stored procedures?

    - by Cory House
    My current process for debugging stored procedures is very simple. I create a table called "debug" where I insert variable values from the stored procedure as it runs. This allows me to see the value of any variable at a given point in the script, but is this is there a better way to debug MySQL stored procedures?

    Read the article

  • mysql meeting multiple conditions

    - by Djeux
    I'm having a table, where one ID, can have multiple statuses | client_id | status_id | | 1 | 2 | | 1 | 3 | | 1 | 5 | | 2 | 2 | | 2 | 3 | | 2 | 6 | The problem is, to select only those client_id's if they have all the statuses i.e. 2,3,5 (status_id = 2 AND status_id = 3 AND status_id = 5) but mysql doesn't allow that directly.

    Read the article

  • PHP and MySQL search with extra counts along the way

    - by Barry Connolly
    I am building a PHP and MySQL search as so SELECT * FROM Properties WHERE Locaion = 'Liverpool' I want to count how many of each property type there are and display them at the side of the page to use as filters (like Rightmove.co.uk). This is what I am have come up with but can't get it to work SELECT *, count(PropertyType = 'house') AS HouesTotal, count(PropertyType = 'Apartment') AS ApartmentTotal FROM Properties WHERE Location = 'Liverpool' Can anyone help?

    Read the article

  • how to import the attributes from one table to another in mysql

    - by user225269
    Is it possible to import the attributes of one table, then I put it into another table using a query in mysql? For example I have table1 with attributes lname, fname, mname And I want to put those attributes into table2. Is there any query that could do that? I'm imagining that the table2 has one attribute that could later be dropped so that it will be the same as table1.

    Read the article

  • MySql: How to know if an entry is compressed or not

    - by Guy
    I'm working with python and mysql and I want to verify that a certain entry is compressed in the db. Ie: cur = db.getCursor() cur.execute('''select compressed_column from table where id=12345''') res = cur.fetchall() at this point I would like to verify that the entry is compressed (ie in order to work with the data you would have to use select uncompress(compressed_column)..). Ideas?

    Read the article

  • Storing MySQL GUID/UUIDs

    - by thr
    This is the best way I could come up with to convert a MySQL GUID/UUID generated by UUID() to a binary(16): UNHEX(REPLACE(UUID(),'-','')) And then storing it in a BINARY(16) Are there any implications of doing it this way that I should know of?

    Read the article

  • MySQL: Digits (1.75) to Friendly Time (1 hour and 45 minutes)

    - by Nick
    In my MySQL database, I have a float field named "HoursSpent" with values like "0.25", "1.75", "2.5", etc. Is there a way that I can have my SELECT statement format those values in a friendly format like this?: 0.25 = 15 minutes 1.75 = 1 hour and 45 minutes 2.5 = 2 hours and 30 minutes The "HoursSpent" field is supposed to only have values in 0.25 increments, but if somebody were to put something random like 0.16, it would be nice if the SELECT statement handled that by rounding it up to the nearest 0.25 (so in this case 0.16 would become 0.25, or 15 minutes).

    Read the article

  • Update all table rows but top N in Mysql

    - by arthurprs
    I was trying to run the following query UPDATE blog_post SET `thumbnail_present`=0, `thumbnail_size`=0, `thumbnail_data`='' WHERE `blog_post` NOT IN ( SELECT `blog_post` FROM blog_post ORDER BY `blog_post` DESC LIMIT 10) But Mysql doesn't allow 'LIMIT' in an 'IN' subquery. I think I can make a select to count the table rows and then make an ordered update limited by 'COUNT - 10', but I was wondering if there is a better way. Thanks in advance.

    Read the article

  • seperated mysql statement query in php

    - by stone
    So, I can run the following statements from within mysql itself successfully. SET @fname = 'point1'; SELECT * FROM country WHERE name=@fname;` But when I try to pass the query through php like this and run it, I get an error on the second line $query = "SET @fname = 'point1';"; $query .= "SELECT * FROM country WHERE name=@fname;";

    Read the article

  • multiple updation using single mysql query

    - by Ajith
    I need to update multiple rows with different values.Is it possible to do in mysql? ie,some thing like this UPDATE landing_page SET (rotation_slot_begin='0',rotation_slot_end='0.333333333333' where landing_pageid=265),(rotation_slot_begin='0.333333333333',rotation_slot_end='0.666666666667' where landing_pageid=267),(rotation_slot_begin='0.666666666667',rotation_slot_end='1' where landing_pageid=268) but this query is not working.I think something like this.Anybody can help me please

    Read the article

< Previous Page | 120 121 122 123 124 125 126 127 128 129 130 131  | Next Page >