Search Results

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

Page 127/616 | < Previous Page | 123 124 125 126 127 128 129 130 131 132 133 134  | Next Page >

  • PHP+MySQL Update TimeStamp and get NOW() back

    - by Ben
    Is it possible to merge these two mysql queries into one? I want to get NOW() returned to a php variable. mysql_query('INSERT INTO translate (IDRef, RefType, Lang, Text, LastChangeTS) VALUES ('.$id.', \''.$reftype.'\', \''.$lang.'\', \''.$text.'\', NOW()) ON DUPLICATE KEY UPDATE text = \''.$text.'\', LastChangeTS = NOW()'); mysql_query('SELECT LastChangeTS FROM translate WHERE IDRef = '.$id.' AND RefType = \''.$reftype.'\' AND Lang = \''.$lang.'\'');

    Read the article

  • Getting rows which include a value with MySQL

    - by sundowatch
    I have a MySQL query which gets including some vars like that: messages TABLE receiver cols user1 rows : 1,3,5 user2 rows : 2,3 user3 rows : 1,4 I want to get rows which includes '3' value. So I will get 'user1' and 'user2'. I tried that but naturally it doesn't work. mysql_query("SELECT * FROM messages WHERE receiver='3'"); How can I do this?

    Read the article

  • Time not entered in mysql ? Java

    - by Nitesh Panchal
    Hello, I have a datetime field in mysql table and i am using JPA for persisting data but only date goes in database. Time always shows 00:00:00. What should i do? I am not doing any manipulation with Date. All i do is to assign new Date() to a variable and store it in database. What am i doing wrong?

    Read the article

  • MySQL select/where statement

    - by expo101
    I have a webapplication linked to a mysql database with the following fields: field 1:trip_id field 2:trip_destination field 3:trip_description field 4:trip_duration In the webapplication I have a listbox based on the following: ListBox value =1: trip duration 1 - 5 days ListBox value =2: trip duration 6 - 10 days Listbox value =3: trip duration 11 -20 days ListBox value =4: trip duration over 20 days How do I put this in the sql select statement?

    Read the article

  • how to number the datas from mysql

    - by udaya
    Hi This is a doubt on mysql select query let me axplain my doubt with a simple example consider this is my query SELECT dbCountry from tableCountry tableCountry has fields dbCuntryId dbCountry and dbState I have the result as dbCountry india america england kenya pakisthan I need the result as 1 india 2 america 3 england 4 kenya 5 pakisthan the numbers 12345 must be generated with the increase in data and itis not a autoincrement id How can i get it is it something like loop

    Read the article

  • How to transfer data from MYsql server to iphone

    - by creator7
    Hi All, I created a webservice in RDB with .Net.I able to transfer data from iphone to mysql and it returns the data. But i need to transfer data from RDB to iphone whenever i need (i am strucked by the ip address of iphone which one is dynamic to connect the device from a RDB) Please tell me how i will do it otherwise tell is any other way. Thanks in Advance

    Read the article

  • mysql query fails.It gives me invalid result

    - by user2941349
    I have to write mysql query for fetching result from my database with a specified date and code like ABH18 or ABH17 or ABH19.I write the querly like below. select * from tbl_transaction where trans_name like 'ABH19%' or trans_name like 'ABH18%' or trans_name like 'ABH17%' or trans_name like 'ABH15%' and date_of_vazhipad='2013-11-20' and trans_status='Completed successfully.' There are no result in the DB satisfying all above conditions.But i got result with different dates.But i want to ensure the date_of_vazhipad='2013-11-20' so that the query may work properly Thanks in advance

    Read the article

  • Index a mysql table of 3 integer fields

    - by Doori Bar
    I have a mysql table of 3 integer fields. None of the fields have a unique value - but the three of them combined are unique. When I query this table, I only search by the first field. Which approach is recommended for indexing such table? Having a multiple-field primary key on the 3 fields, or setting an index on the first field, which is not unique? Thanks, Doori Bar

    Read the article

  • MySQL greatest value in row?

    - by noryb009
    Hi! I'm using MySQL with PHP. This is like my table: (I'm using 3 values, but there are more) id | 1 | 2 | 3 1 | 3 |12 |-29 2 | 5 |8 |8 3 | 99|7 |NULL I need to get the greatest value in a certain row. If should get: (id - output) (1 - 2), (2-2), (3-1). Is there any queries for this? I've been trying, but I can't get it to work right.

    Read the article

  • PHP and MySQL - correct way to use mysqli_real_escape_string

    - by TaG
    I was wondering if the code below is the correct way to use mysqli_real_escape_string() when storing users data in a database. Here is the PHP & MySQL code. if (mysqli_num_rows($dbc) == 0) { $mysqli = mysqli_connect("localhost", "root", "", "sitename"); $dbc = mysqli_query($mysqli,"INSERT INTO info (user_id, url) VALUES ('$user_id', 'mysqli_real_escape_string($url)')"); } if ($dbc == TRUE) { $dbc = mysqli_query($mysqli,"UPDATE info SET url = 'mysqli_real_escape_string($url)' WHERE user_id = '$user_id'");

    Read the article

  • Sorting MySQL table by next due date

    - by Zagga
    Hi folks, I have a MySQL table that stores (amongst other things) a persons date of birth. Is there any way to sort the table so the next due birthday is at the top? I have the date stored in standard yyyy-mm-dd DATE format and seperate year, month and day fields so I can sort it by the first birthday of the year (ORDER BY month, day) but I can't seem to get any further. Any help would be greatly appreciated. Zagga

    Read the article

  • I need some advice from Experts on how to develop a PHP site with MySQL

    - by mouthpiec
    Hi, I need some advice from experts :) I will develop a website using PHP and I will use also MySQL. I bought some server space from a Virtual private server including all the service needed. How should I develop the site? Shall I develop it on my machine at home (using for example Wamp), and when ready transfer all the files to the server? If so what is the best method to transfer also the database? Thanks in advance!!

    Read the article

  • summing the sum in mysql

    - by JPro
    Hi, Say If I get a resultset in mysql as : ID count(posts) 101 2344 102 3245 103 232 104 23 Is there any way to get the tota count of count(posts) in the query itself, like this? ID count(posts) 101 2344 102 3245 103 232 104 23 ------ 5844

    Read the article

  • Store html into MYSql database

    - by jouzef19
    hello I'm try to store String (that contain html ) to mysql database by using Longtext data type. but its always says "You have an error in your SQL syntax". (note : i tried to store normal text , and its work)

    Read the article

  • Get top rated item using AVG mysql

    - by user1876234
    I want to find top rated item using AVG function in mysql, right now my query looks like this: SELECT a.title, AVG(d.rating) as rating FROM in8ku_content a JOIN in8ku_content_ratings d ON a.id = d.article_id ORDER BY rating DESC Problem is that it takes AVG of all items and the result is not accurate, what should be changed here to get correct result ? Tables: in8ku_content [id, title] in8ku_content_ratings [id, article_id, rating]

    Read the article

  • Sort MYSQL Data By Number of Entries

    - by Belgin Fish
    Hi, I'm wondering how I can sort mysql data based on the number of entries. I'm doing this so I can have a page of the top purchases, so it would have to retrieve all the product_id's from a table, and then sort them by the most times one shows up, limiting it to 10 or something. Thanks!

    Read the article

  • How to remove MySQL database?

    - by Masi
    You may notice from my last question that a problem caused some more problems here. My database is now unusable partly due to my interest to break things and my inability to look at error messages. I know that I should not reuse primary keys, but I would like to use them again after the removal of the database that I deteriorated. So How can you correctly remove MySQL database?

    Read the article

< Previous Page | 123 124 125 126 127 128 129 130 131 132 133 134  | Next Page >