Search Results

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

Page 118/616 | < Previous Page | 114 115 116 117 118 119 120 121 122 123 124 125  | Next Page >

  • MySql Join using 4 tables

    - by Ionut Flavius Pogacian
    I have 4 tables and i want to join them and extarct 4 values. I wrote the followig MySql Query, but it does not work. select `a`.`id`,`a`.`page` xpage,`a`.`action`, `b`.`header` xheader, `b`.`page_id`, `c`.`content` xcontent,`b`.`page_id`, `d`.`footer` xfooter,`d`.`page_id` join `header` b on `a`.`id`=`b`.`page_id` join `content` c on `a`.`id`=`c`.`page_id` and `a`.`id`=`d`.`page_id` join `footer` d on `a`.`id`=`d`.`page_id` where `a`.`page`='main'

    Read the article

  • MySQL More Tables or More Rows

    - by Pez Cuckow
    I am working on a game that I am going to open to the public to have on their game. The game stores lots of information (about 300 rows) per website and spends a lot of time updating values within this MySQL database. Is it better (faster/efficient) to add a new table for every website or to just have 1000's of rows in one table and add a column "website_id" or similar?

    Read the article

  • How to display MySQL Select statement results in PHP

    - by Vafello
    I have the following code and it should return just one value (id) from mysql table. The following code doesnt work. How can I output it without creating arrays and all this stuff, just a simple output of one value. $query = "SELECT id FROM users_entity WHERE username = 'Admin' "; $result = map_query($query); echo $result;

    Read the article

  • How to search multiple columns in MySQL?

    - by George
    I'm trying to make a search feature that will search multiple columns to find a keyword based match. This query: SELECT title FROM pages LIKE %$query%; works only for searching one column, I noticed separating column names with commas results in an error. So is it possible to search multiple columns in mysql?

    Read the article

  • mysql custom sorting first alpha then numeric using case when

    - by Nizzy
    How can you sort a query using ORDER BY CASE WHEN REGEXP? or other alternatives? I don't want to use UNION. Thank you mysql> SELECT `floor_id`, `floor_number` FROM `floors`; +----------+--------------+ | floor_id | floor_number | +----------+--------------+ | 1 | 4 | | 2 | 7 | | 3 | G | | 4 | 19 | | 5 | B | | 6 | 3 | | 7 | A | +----------+--------------+ Expected result: +----------+--------------+ | floor_id | floor_number | +----------+--------------+ | 7 | A | | 5 | B | | 3 | G | | 6 | 3 | | 1 | 4 | | 2 | 7 | | 4 | 19 | +----------+--------------+

    Read the article

  • Difference of two series in MySQL

    - by Brian
    I have a table with the following fields in MySQL: date, Value, Type. Type can be either exports or imports. I want a query that returns the trade deficit (exports-imports) for each month. Is this possible with a single query?

    Read the article

  • Beginner MYSQL Error - Access Denied

    - by WANNABE
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: N O) I've tried EVERYTHING, I've read through pages of answers and no-one seems to know the right one. When i try to log into my DB i just get the above error, I havent set a password or anything. Can't log into MySQL at all now, don't understand. Thanks for your help in advance

    Read the article

  • python popen and mysql import

    - by khelll
    I'm doing the following: from subprocess import PIPE from subprocess import Popen file = 'dump.sql.gz' p1 = Popen(["gzip", "-cd" ,file], stdout=PIPE) print "Importing temporary file %s" % file p2 = Popen(["mysql","--default-character-set=utf8", "--user=root" , "--password=something", "--host=localhost", "--port=3306" , 'my_db'],stdin=p1.stdout, stdout=PIPE,stderr=PIPE) err = p1.communicate()[1] if err: print err err = p2.communicate()[1] if err: print err But the db is not being populated. No errors are shown, also I have checked p1.stdout and it has the file contents. Any ideas?

    Read the article

  • How do I properly use LINQ with MySQL?

    - by Arda Xi
    I've been looking this up on Google for hours, but I haven't found anything conclusive. So far, I've seen a few paid options, an option with NHibernate, but most are marked as unstable or in production. Is there a stable implementation of LINQ for MySQL?

    Read the article

  • spatial indexing mysql

    - by shaiju
    i have to integrate spatial indexing in mysql .i got an example i almost done it.in that example INSERT INTO address VALUES('Foobar street 12', GeomFromText('POINT(2671 2500)')); inplace of 2671 and 2500 i have to insert latitude and longitude in below format 35.177 ,-77.11. How is it possibe .Please help me

    Read the article

  • MySQL create view from concat value

    - by cnotethegr8
    Lets say I have a table as follows, +----+-------------+ | id | value | +----+-------------+ | 1 | aa,bb,cc,dd | | 2 | ee,ff,gg,hh | +----+-------------+ I want to be able to search this table to see if id = 1 AND value = 'cc'. Im assuming a good way of doing this is to grab the id = 1 row and split its values into separate rows in a new view. Something like, +-----+ | val | +-----+ | aa | | bb | | cc | | dd | +-----+ I would like to do all of this in MySQL. How can i do this, and is there possibly a better way to do it?

    Read the article

  • Adobe AIR & PHP + MySQL

    - by Cudos
    Hello. I am looking for a possibility to run a PHP + MySQL solution on a desktop. Can Adobe AIR accomplish that for me? Will the setup be able to access the COM port of the computer?

    Read the article

  • Check if row exists, if not add it [MySQL]

    - by Steven
    I need to add a row to a MySQL database table but only if the row doesn't already exist. My database server just went down so I can't test this, but will this work as expected? INSERT INTO `blocks` (`block_file`,`settings_group`) VALUES ('announcements','announcement_settings') WHERE NOT EXISTS (SELECT `block_file`,`settings_group` FROM `blocks` WHERE `block_file`='announcements' AND `settings_group`='announcement_settings') It seems like sound logic. Is this a valid query or is there a better way of doing this?

    Read the article

  • mysql error #1452 appearing when trying to add a constraint

    - by user1701484
    I am trying to alter a table so That I can add a foreign key constraint in mysql database: ALTER TABLE `Question` ADD CONSTRAINT `FK_question` FOREIGN KEY (`QuestionId`) REFERENCES `Image_Question` (`QuestionId`) ON DELETE CASCADE ; Problem is that it is giving me this error: 1452 - Cannot add or update a child row: a foreign key constraint fails (mobile_app. '#sql-4517_15241', CONSTRAINT FK_question FOREIGN KEY (QuestionId) REFERENCES Image_Question (QuestionId) ON DELETE CASCADE) What does this error actually mean and what are the possible solutions I might have to undertake in order to fix this?

    Read the article

  • Memcache vs MySQL in memory

    - by TimK
    I have a database that won't grow much in size. It's current size is about 1 GB. Achieving the fastest performance is desired. Question: When should I use Memcache vs simply using MySQL Innodb ability to store all my content within RAM (innodb_buffer_pool_size)?

    Read the article

  • Big, Thick Reference Books (PHP / MySQL / Unix) [closed]

    - by Josh K
    I'm looking for in-depth reference books / guides in PHP, MySQL, and Unix. I'm aware there other other questions pertaining to good books for short references of function names, or detailed beginner guides to these systems. I'm looking for something different. I want a book that I can either use as a quick but in-depth (decent write up, not a pocket reference guide) reference to common functions (JOINS, string manipulation, Regular Expressions, etc) while also providing a detailed inner workings explanation on the system itself.

    Read the article

  • What is the equivalent of REGEXP_SUBSTR in mysql?

    - by KandadaBoggu
    I want to extract a word from a string column of a table. description =========================== abc order_id: 2 xxxx yyy aa mmm order_id: 3 nn kk yw Expected result set order_id =========================== 2 3 Table will at most have 100 rows, text length is ~256 char and column always has one order_id present. So performance is not an issue. In Oracle, I can use REGEXP_SUBSTR for this problem. How would I solve this in MySQL?

    Read the article

  • Change date format (in DB or output) to dd/mm/yyyy - PHP MySQL

    - by Jess
    MySQL stores the date in my database (by default) as 'YYYY-MM-DD' The field type for my date is 'DATE' (I do not need any time storage).. Is there a simple way to change it by default to DD/MM/YYYY ? I call up different dates in 2 different tables, and no where in any of my code do I have anything resembling a date variable or anything! Hopefully this is a straight forward change?

    Read the article

  • mysql procedure to update numeric reference in previous rows when one is updated

    - by markcial
    There's a table like this one ______________________ | id | title | order | |----------------------| | 1 | test1 | 1 | |-----|--------|-------| | 2 | test2 | 2 | |-----|--------|-------| | 3 | test3 | 3 | |-----|--------|-------| | 4 | test4 | 4 | '----------------------' when i introduce in my mysql shell a single update to a row $sql UPDATE `table` SET order=1 WHERE id=3; And then procedure or method resamples order column in the before update lower values to get its order renewed like this ______________________ | id | title | order | |----------------------| | 1 | test1 | 2 | |-----|--------|-------| | 2 | test2 | 3 | |-----|--------|-------| | 3 | test3 | 1 | |-----|--------|-------| | 4 | test4 | 4 | '----------------------' Any help would be appreciated, thanks!

    Read the article

< Previous Page | 114 115 116 117 118 119 120 121 122 123 124 125  | Next Page >