Search Results

Search found 727 results on 30 pages for 'phpmyadmin'.

Page 12/30 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • mysql - how do I load data from a different configuration...

    - by Ronedog
    I'm not sure if this will make sense, but I'll give it a shot. My hard drive went down and I had to reinstall the os along with all my webserver configuration,etc. I kept a backup of the mysql database, but it doesn't contain all the tables...I added a couple tables after my last backup. I have access to the hard drive and the directory where the mysql data files are stored from the failed hard drive, but I don't know how to retrieve the data into my new mysql database. Is it even possible to get the raw data files from mysql and load them into a different instance? I'd even be happy if there was some way for phpmyadmin to show the data files, then I could dump out to a backup txt file, and reload them into my new configuration. Any help will be appreciated. thanks.

    Read the article

  • Should I use DATE and TIME as fields rather than DATETIME

    - by whitstone86
    I have a project on going for a TV guide, called mytvguide in the database - I use PHPMyAdmin. This is the structure for one table, which is called tvshow1: Field Type channel varchar(255) date date No airdate time No expiration time No episode varchar(255) setreminder varchar(255) but am not sure how to get DATE, TIME to work with the pagination script (below is the script, which works for the version with DATETIME): http://pastebin.com/6S1ejAFJ However, although the DATETIME one works - it shows programmes that air on the day itself like this: Programme 1 showing on Channel 1 2:35pm "Episode 2" Set Reminder Programme 1 showing on Channel 1 May 26th - 12:50pm "Episode 3" Set Reminder Programme 1 showing on Channel 1 May 26th - 5:55pm "Episode 3" Set Reminder but I'm not quite sure how to replicate that for the fields that use DATE, TIME functions as seen above. Any advice on this is appreciated, thanks!

    Read the article

  • select subquery cause mysql server to be unresponsive

    - by Xiao
    DELETE FROM item_measurement WHERE measurement_id IN ( SELECT (-id) AS measurement_id FROM invoice_item WHERE invoice_id = 'A3722' ) I've really tried hard to find what's wrong with the code. I tried to run this in a php page, which doesn't respond. I also tried the same line in phpmyadmin, infinite spinning circle and I had to restart the server(MAMP on Mac 10.9). No error was given in browser/ If I run the delete and select separately, they both finish very quickly. I don't think it's a performance issue because the separate run took < 0.1 sec each. Thanks for any help in advance. Edit: I also found that a simple select statement will also suspend mysql: select * from item_measurement where measurement_id in (select -id from invoice_item where invoice_id='A3722')

    Read the article

  • How to connect these together?

    - by Biertago
    I've got a mysql database created by phpMyAdmin and I want to use it in my Qt project. I tried it on Visual Studio 2010 with an qt addon but it didn't work neither. In Qt Creator, I add: QT += sql in a .pro file and include: #include <QSqlDatabase> in the main file but there's a driver error. I don't know even where to start and each google page shows something different. I tried to look for some guide but there is nothing which concerns everything in []s.

    Read the article

  • Setting an empty default value for a char-column in MySQL?

    - by user281434
    Hi In phpMyAdmin I have a char(32) column that has no default value(ie. Default: None). When I try to insert data through a SQL query, it throws out an error saying that the column "doesn't have a default value". I need it to be empty, so instead I've just set it's default value as "As defined: " and then nothing in the value field. Is this a bad idea? And is it any better than simply throwing in an empty value for the column in the SQL query? Thanks for your time.

    Read the article

  • Custom fail2ban Filter

    - by Michael Robinson
    In my quest to block excessive failed phpMyAdmin login attempts with fail2ban, I've created a script that logs said failed attempts to a file: /var/log/phpmyadmin_auth.log Custom log The format of the /var/log/phpmyadmin_auth.log file is: phpMyadmin login failed with username: root; ip: 192.168.1.50; url: http://somedomain.com/phpmyadmin/index.php phpMyadmin login failed with username: ; ip: 192.168.1.50; url: http://192.168.1.48/phpmyadmin/index.php Custom filter [Definition] # Count all bans in the logfile failregex = phpMyadmin login failed with username: .*; ip: <HOST>; phpMyAdmin jail [phpmyadmin] enabled = true port = http,https filter = phpmyadmin action = sendmail-whois[name=HTTP] logpath = /var/log/phpmyadmin_auth.log maxretry = 6 The fail2ban log contains: 2012-10-04 10:52:22,756 fail2ban.server : INFO Stopping all jails 2012-10-04 10:52:23,091 fail2ban.jail : INFO Jail 'ssh-iptables' stopped 2012-10-04 10:52:23,866 fail2ban.jail : INFO Jail 'fail2ban' stopped 2012-10-04 10:52:23,994 fail2ban.jail : INFO Jail 'ssh' stopped 2012-10-04 10:52:23,994 fail2ban.server : INFO Exiting Fail2ban 2012-10-04 10:52:24,253 fail2ban.server : INFO Changed logging target to /var/log/fail2ban.log for Fail2ban v0.8.6 2012-10-04 10:52:24,253 fail2ban.jail : INFO Creating new jail 'ssh' 2012-10-04 10:52:24,253 fail2ban.jail : INFO Jail 'ssh' uses poller 2012-10-04 10:52:24,260 fail2ban.filter : INFO Added logfile = /var/log/auth.log 2012-10-04 10:52:24,260 fail2ban.filter : INFO Set maxRetry = 6 2012-10-04 10:52:24,261 fail2ban.filter : INFO Set findtime = 600 2012-10-04 10:52:24,261 fail2ban.actions: INFO Set banTime = 600 2012-10-04 10:52:24,279 fail2ban.jail : INFO Creating new jail 'ssh-iptables' 2012-10-04 10:52:24,279 fail2ban.jail : INFO Jail 'ssh-iptables' uses poller 2012-10-04 10:52:24,279 fail2ban.filter : INFO Added logfile = /var/log/auth.log 2012-10-04 10:52:24,280 fail2ban.filter : INFO Set maxRetry = 5 2012-10-04 10:52:24,280 fail2ban.filter : INFO Set findtime = 600 2012-10-04 10:52:24,280 fail2ban.actions: INFO Set banTime = 600 2012-10-04 10:52:24,287 fail2ban.jail : INFO Creating new jail 'fail2ban' 2012-10-04 10:52:24,287 fail2ban.jail : INFO Jail 'fail2ban' uses poller 2012-10-04 10:52:24,287 fail2ban.filter : INFO Added logfile = /var/log/fail2ban.log 2012-10-04 10:52:24,287 fail2ban.filter : INFO Set maxRetry = 3 2012-10-04 10:52:24,288 fail2ban.filter : INFO Set findtime = 604800 2012-10-04 10:52:24,288 fail2ban.actions: INFO Set banTime = 604800 2012-10-04 10:52:24,292 fail2ban.jail : INFO Jail 'ssh' started 2012-10-04 10:52:24,293 fail2ban.jail : INFO Jail 'ssh-iptables' started 2012-10-04 10:52:24,297 fail2ban.jail : INFO Jail 'fail2ban' started When I issue: sudo service fail2ban restart fail2ban emails me to say ssh has restarted, but I receive no such email about my phpmyadmin jail. Repeated failed logins to phpMyAdmin does not cause an email to be sent. Have I missed some critical setup? Is my filter's regular expression wrong? Update: added changes from default installation Starting with a clean fail2ban installation: cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local Change email address to my own, action to: action = %(action_mwl)s Append the following to jail.local [phpmyadmin] enabled = true port = http,https filter = phpmyadmin action = sendmail-whois[name=HTTP] logpath = /var/log/phpmyadmin_auth.log maxretry = 4 Add the following to /etc/fail2ban/filter.d/phpmyadmin.conf # phpmyadmin configuration file # # Author: Michael Robinson # [Definition] # Option: failregex # Notes.: regex to match the password failures messages in the logfile. The # host must be matched by a group named "host". The tag "<HOST>" can # be used for standard IP/hostname matching and is only an alias for # (?:::f{4,6}:)?(?P<host>\S+) # Values: TEXT # # Count all bans in the logfile failregex = phpMyadmin login failed with username: .*; ip: <HOST>; # Option: ignoreregex # Notes.: regex to ignore. If this regex matches, the line is ignored. # Values: TEXT # # Ignore our own bans, to keep our counts exact. # In your config, name your jail 'fail2ban', or change this line! ignoreregex = Restart fail2ban sudo service fail2ban restart PS: I like eggs

    Read the article

  • Wordpress SQL Select Multiple Meta Values / Meta Keys / Custom Fields

    - by Wes
    I am trying to modify a wordpress / MySQL function to display a little more information. I'm currently running the following query that selects the post, joins the 'postmeta' and gets the info where the meta_key = _liked function most_liked_posts($numberOf, $before, $after, $show_count) { global $wpdb; $request = "SELECT ID, post_title, meta_value FROM $wpdb->posts, $wpdb->postmeta"; $request .= " WHERE $wpdb->posts.ID = $wpdb->postmeta.post_id"; $request .= " AND post_status='publish' AND post_type='post' AND meta_key='_liked' "; $request .= " ORDER BY $wpdb->postmeta.meta_value+0 DESC LIMIT $numberOf"; $posts = $wpdb->get_results($request); foreach ($posts as $post) { $post_title = stripslashes($post->post_title); $permalink = get_permalink($post->ID); $post_count = $post->meta_value; echo $before.'<a href="' . $permalink . '" title="' . $post_title.'" rel="nofollow">' . $post_title . '</a>'; echo $show_count == '1' ? ' ('.$post_count.')' : ''; echo $after; } } The important part being: $post_count = $post->meta_value; But now I want to also grab a value that is attached to each post called wbphoto How do I specify that $post_count = _liked and $photo = wbphoto ? Here is a screen cap of my Phpmyadmin

    Read the article

  • sql foreign keys

    - by Paul Est
    I was create tables with the syntax in phpmyadmin: DROP TABLE IF EXISTS users; DROP TABLE IF EXISTS info; CREATE TABLE users ( user_id int unsigned NOT NULL auto_increment, email varchar(100) NOT NULL default '', pwd varchar(32) NOT NULL default '', isAdmin int(1) unsigned NOT NULL, PRIMARY KEY (user_id) ) TYPE=INNODB; CREATE TABLE info ( info_id int unsigned NOT NULL auto_increment, first_name varchar(100) NOT NULL default '', last_name varchar(100) NOT NULL default '', address varchar(300) NOT NULL default '', zipcode varchar(100) NOT NULL default '', personal_phone varchar(100) NOT NULL default '', mobilephone varchar(100) NOT NULL default '', faxe varchar(100) NOT NULL default '', email2 varchar(100) NOT NULL default '', country varchar(100) NOT NULL default '', sex varchar(1) NOT NULL default '', birth varchar(1) NOT NULL default '', email varchar(100) NOT NULL default '', PRIMARY KEY (info_id), FOREIGN KEY (email) REFERENCES users(email) ON UPDATE CASCADE ON DELETE CASCADE ) TYPE=INNODB; But shows the error "#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=INNODB' at line 11 " If i remove the TYPE=INNODB in the end of create the tables, it will show the error "#1005 - Can't create table 'curriculo.info' (errno: 150) ".

    Read the article

  • MySQL Stored Procedures not working with SELECT (basic question)

    - by TMG
    Hello, I am using a platform (perfectforms) that requires me to use stored procedures for most of my queries, and having never used stored procedures, I can't figure out what I'm doing wrong. The following statement executes without error: DELIMITER // DROP PROCEDURE IF EXISTS test_db.test_proc// CREATE PROCEDURE test_db.test_proc() SELECT 'foo'; // DELIMITER ; But when I try to call it using: CALL test_proc(); I get the following error: #1312 - PROCEDURE test_db.test_proc can't return a result set in the given context I am executing these statements from within phpmyadmin 3.2.4, PHP Version 5.2.12 and the mysql server version is 5.0.89-community. When I write a stored procedure that returns a parameter, and then select it, things work fine (e.g.): DELIMITER // DROP PROCEDURE IF EXISTS test_db.get_sum// CREATE PROCEDURE test_db.get_sum(out total int) BEGIN SELECT SUM(field1) INTO total FROM test_db.test_table; END // DELIMITER ; works fine, and when I call it: CALL get_sum(@t); SELECT @t; I get the sum no problem. Ultimately, what I need to do is have a fancy SELECT statement wrapped up in a stored procedure, so I can call it, and return multiple rows of multiple fields. For now I'm just trying to get any select working. Any help is greatly appreciated.

    Read the article

  • Exporting database from external server (without SSH access)

    - by Derek Carlisle
    Our current website is hosted by the design agency who originally built the website, however we are bringing the development of the website in house therefore need to export the database from their server and import it to ours. We have FTP and phpMyAdmin access but don't have SSH access to the server. I was hoping to run a PHP script that would mysql dump the database, compress it and then copy it across to our server using scp: $backupFile = $_SERVER['DOCUMENT_ROOT'].'/backup' . date("Y-m-d-H-i-s") . '.gz'; system("mysqldump -h DB_HOST -u DB_USER -pDB_PASS DB_NAME | gzip > $backupFile"); exec("sshpass -p PASSWORD scp -r -P PORT_NUMBER $backupFile [email protected]:/path/to/directory/"); I have ran this locally from the command line and it worked fine, although I had to install sshpass (the hosting server might not have this installed). Also, I was hoping to run it from the browser as I don't have command line access on the hosting server, however it didn't work, no errors produced though. Can you anyone recommend how I can export from the server that I don't have SSH access to and import to my server? Thanks

    Read the article

  • Apache (XAMPP 1.8.0) access.log/Intrusion Detection Concern

    - by Andy Holaday
    [I originally posted on SO but it earned me a Tumbleweed badge. This looks like a better venue for the question.] I have Apache (XAMPP 1.8.0) running on Vista Pro x64. A couple times now I have seen a pattern like the example below in access.log. Concerning is the "attack" seems to somehow shift from a public IP to a valid private IP on my network (happens to be the WAN address of one of my routers). Two questions: How is this possible, and what happens if the "attacker" stumbles on a valid request? I've googled this to no avail. 177.0.X.X - - [03/Jun/2012:08:19:34 -0400] "GET /phpMyAdmin-2.5.4/index.php HTTP/1.1" 403 177.0.X.X - - [03/Jun/2012:08:19:34 -0400] "GET /phpMyAdmin-2.5.5-rc1/index.php HTTP/1.1" 403 177.0.X.X - - [03/Jun/2012:08:19:34 -0400] "GET /phpMyAdmin-2.2.6/index.php HTTP/1.1" 403 177.0.X.X - - [03/Jun/2012:08:19:34 -0400] "GET /phpMyAdmin-2.5.5-rc2/index.php HTTP/1.1" 403 192.168.15.3 - - [03/Jun/2012:08:19:56 -0400] "GET /phpMyAdmin-2.5.6-rc2/index.php HTTP/1.1" 403 177.0.X.X - - [03/Jun/2012:08:19:56 -0400] "GET /phpMyAdmin-2.5.6-rc1/index.php HTTP/1.1" 403 177.0.X.X - - [03/Jun/2012:08:19:56 -0400] "GET /phpMyAdmin-2.5.5-pl1/index.php HTTP/1.1" 403 192.168.15.3 - - [03/Jun/2012:08:19:59 -0400] "GET /phpMyAdmin-2.5.7/index.php HTTP/1.1" 403 192.168.15.3 - - [03/Jun/2012:08:20:01 -0400] "GET /phpMyAdmin-2.5.7-pl1/index.php HTTP/1.1" 403 192.168.15.3 - - [03/Jun/2012:08:20:02 -0400] "GET HTTP/1.1" 400 1060 "-" "-"

    Read the article

  • php code is not fetching data from mysql database using wamp server

    - by john
    I want to display a table from database in phpMyAdmin by putting the following conditions that in every different options in drop down menu it displays different table from database by pressing the button of search. But it is not doing so. <p class="h2">Quick Search</p> <div class="sb2_opts"> <p></p> <form method="post" action="" > <p>Enter your source and destination.</p> <p>From:</p> <select name="from"> <option value="Islamabad">Islamabad</option> <option value="Lahore">Lahore</option> <option value="murree">Murree</option> <option value="Muzaffarabad">Muzaffarabad</option> </select> <p>To:</p> <select name="To"> <option value="Islamabad">Islamabad</option> <option value="Lahore">Lahore</option> <option value="murree">Murree</option> <option value="Muzaffarabad">Muzaffarabad</option> </select> <input type="submit" value="search" /> </form> </form> </table> <?php $con=mysqli_connect("localhost","root","","test"); if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } if(isset($_POST['from']) and isset($_POST['To'])) { $from = $_POST['from'] ; $to = $_POST['To'] ; $table = array($from, $to); switch ($table) { case array ("Islamabad", "Lahore") : $result = mysqli_query($con,"SELECT * FROM flights"); echo "</flights>"; //table name is flights break; case array ("Islamabad", "Murree") : $result = mysqli_query($con,"SELECT * FROM isb to murree"); echo "</isb to murree>"; //table name isb to murree ; break; case array ("Islamabad", "Muzaffarabad") : $result = mysqli_query($con,"SELECT * FROM isb to muzz"); echo "</isb to muzz>"; break; //..... //...... default: echo "Your choice is nor valid !!"; } } mysqli_close($con); ?>

    Read the article

  • Trying to import SQL file in a xampp server returns error

    - by Victor_J_Martin
    I have done a ER diagram in Mysql Workbench, and I am trying load in my server with phpMyAdmin, but it returns me the next error: Error SQL Query: -- ----------------------------------------------------- -- Table `BDA`.`UG` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `BDA`.`UG` ( `numero_ug` INT NOT NULL, `nombre` VARCHAR(45) NOT NULL, `segunda_firma_autorizada` VARCHAR(45) NOT NULL, `fecha_creacion` DATE NOT NULL, `nombre_depto` VARCHAR(140) NOT NULL, `dni` INT NOT NULL, `anho_contable` INT NOT NULL, PRIMARY KEY (`numero_ug`), INDEX `nombre_depto_idx` (`nombre_depto` ASC), INDEX `dni_idx` (`dni` ASC), INDEX `anho_contable_idx` (`anho_contable` ASC), CONSTRAINT `nombre_depto` FOREIGN KEY (`nombre_depto`) REFERENCES `BDA`.`Departamento` (`nombre_depto`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `dni` FOREIGN KEY (`dni`) REFERENCES `BDA`.`Trabajador` (`dni`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `anho_contable` FOREIGN KEY (`anho_contable`) REFERENCES `BDA`.`Capitulo_Contable` (`anho_contable`) [...] MySQL said: Documentation #1022 - Can't write; duplicate key in table 'ug' I export the result of the diagram from Mysql Workbench to a SQL file, and this file is what I'm trying to upload. This is the file. I can not find the duplicate key. SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; CREATE SCHEMA IF NOT EXISTS `BDA` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ; USE `BDA` ; -- ----------------------------------------------------- -- Table `BDA`.`Departamento` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `BDA`.`Departamento` ( `nombre_depto` VARCHAR(140) NOT NULL, `area_depto` VARCHAR(140) NOT NULL, PRIMARY KEY (`nombre_depto`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `BDA`.`Trabajador` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `BDA`.`Trabajador` ( `dni` INT NOT NULL, `direccion` VARCHAR(140) NOT NULL, `nombre` VARCHAR(45) NOT NULL, `apellidos` VARCHAR(140) NOT NULL, `fecha_nacimiento` DATE NOT NULL, `fecha_contrato` DATE NOT NULL, `titulacion` VARCHAR(140) NULL, `nombre_depto` VARCHAR(45) NOT NULL, PRIMARY KEY (`dni`), INDEX `nombre_depto_idx` (`nombre_depto` ASC), CONSTRAINT `nombre_depto` FOREIGN KEY (`nombre_depto`) REFERENCES `BDA`.`Departamento` (`nombre_depto`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `BDA`.`Capitulo_Contable` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `BDA`.`Capitulo_Contable` ( `anho_contable` INT NOT NULL, `numero_ug` INT NOT NULL, `debe` DOUBLE NOT NULL, `haber` DOUBLE NOT NULL, PRIMARY KEY (`anho_contable`), INDEX `numero_ug_idx` (`numero_ug` ASC), CONSTRAINT `numero_ug` FOREIGN KEY (`numero_ug`) REFERENCES `BDA`.`UG` (`numero_ug`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `BDA`.`UG` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `BDA`.`UG` ( `numero_ug` INT NOT NULL, `nombre` VARCHAR(45) NOT NULL, `segunda_firma_autorizada` VARCHAR(45) NOT NULL, `fecha_creacion` DATE NOT NULL, `nombre_depto` VARCHAR(140) NOT NULL, `dni` INT NOT NULL, `anho_contable` INT NOT NULL, PRIMARY KEY (`numero_ug`), INDEX `nombre_depto_idx` (`nombre_depto` ASC), INDEX `dni_idx` (`dni` ASC), INDEX `anho_contable_idx` (`anho_contable` ASC), CONSTRAINT `nombre_depto` FOREIGN KEY (`nombre_depto`) REFERENCES `BDA`.`Departamento` (`nombre_depto`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `dni` FOREIGN KEY (`dni`) REFERENCES `BDA`.`Trabajador` (`dni`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `anho_contable` FOREIGN KEY (`anho_contable`) REFERENCES `BDA`.`Capitulo_Contable` (`anho_contable`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `BDA`.`Cliente` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `BDA`.`Cliente` ( `cif_cliente` INT NOT NULL, `nombre_cliente` VARCHAR(140) NOT NULL, PRIMARY KEY (`cif_cliente`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `BDA`.`Ingreso` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `BDA`.`Ingreso` ( `id` INT NOT NULL, `concepto` VARCHAR(45) NOT NULL, `importe` DOUBLE NOT NULL, `fecha` DATE NOT NULL, `cif_cliente` INT NOT NULL, `numero_ug` INT NOT NULL, PRIMARY KEY (`id`), INDEX `cif_cliente_idx` (`cif_cliente` ASC), INDEX `numero_ug_idx` (`numero_ug` ASC), CONSTRAINT `cif_cliente` FOREIGN KEY (`cif_cliente`) REFERENCES `BDA`.`Cliente` (`cif_cliente`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `numero_ug` FOREIGN KEY (`numero_ug`) REFERENCES `BDA`.`UG` (`numero_ug`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `BDA`.`Proveedor` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `BDA`.`Proveedor` ( `cif_proveedor` INT NOT NULL, `nombre_proveedor` VARCHAR(140) NOT NULL, PRIMARY KEY (`cif_proveedor`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `BDA`.`Gasto` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `BDA`.`Gasto` ( `id` INT NOT NULL, `concepto` VARCHAR(45) NOT NULL, `importe` DOUBLE NOT NULL, `fecha` DATE NOT NULL, `factura` INT NOT NULL, `cif_proveedor` INT NOT NULL, `numero_ug` INT NOT NULL, PRIMARY KEY (`id`), INDEX `cif_proveedor_idx` (`cif_proveedor` ASC), INDEX `numero_ug_idx` (`numero_ug` ASC), CONSTRAINT `cif_proveedor` FOREIGN KEY (`cif_proveedor`) REFERENCES `BDA`.`Proveedor` (`cif_proveedor`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `numero_ug` FOREIGN KEY (`numero_ug`) REFERENCES `BDA`.`UG` (`numero_ug`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; SET SQL_MODE=@OLD_SQL_MODE; SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; Thanks for your advices.

    Read the article

  • using group_concat in PHPMYADMIN will show the result as [BLOB - 3B]

    - by Itay Moav
    I have a query which uses the GROUP_CONCAT of mysql on an integer field. I am using PHPMYADMIN to develop this query. My problem that instead of showing 1,2 which is the result of the concatenated field, I get [BLOB - 3B]. Query is SELECT rec_id,GROUP_CONCAT(user_id) FROM t1 GROUP BY rec_id (both fields are unsigned int, both are not unique) What should I add to see the actual results?

    Read the article

  • Why is 50.22.53.71 hitting my localhost node.js in an attempt to find a php setup

    - by laggingreflex
    I just created a new app using angular-fullstack yeoman generator, edited it a bit to my liking, and ran it with grunt on my localhost, and immediately upon starting up I get this flood of requests to paths that I haven't even defined. Is this a hacking attempt? And if so, how does the hacker (human or bot) immediately know where my server is and when it came online? Note that I haven't made anything online, it's just a localhost setup and I'm merely connected to the internet. (Although my router does allow 80 port incoming.) Whois shows that the IP address belongs to a SoftLayer Technologies. Never heard of it. Express server listening on 80, in development mode GET / [200] | 127.0.0.1 (Chrome 31.0.1650) GET /w00tw00t.at.blackhats.romanian.anti-sec:) [404] | 50.22.53.71 (Other) GET /scripts/setup.php [404] | 50.22.53.71 (Other) GET /admin/scripts/setup.php [404] | 50.22.53.71 (Other) GET /admin/pma/scripts/setup.php [404] | 50.22.53.71 (Other) GET /admin/phpmyadmin/scripts/setup.php [404] | 50.22.53.71 (Other) GET /db/scripts/setup.php [404] | 50.22.53.71 (Other) GET /dbadmin/scripts/setup.php [404] | 50.22.53.71 (Other) GET /myadmin/scripts/setup.php [404] | 50.22.53.71 (Other) GET /mysql/scripts/setup.php [404] | 50.22.53.71 (Other) GET /mysqladmin/scripts/setup.php [404] | 50.22.53.71 (Other) GET /typo3/phpmyadmin/scripts/setup.php [404] | 50.22.53.71 (Other) GET /phpadmin/scripts/setup.php [404] | 50.22.53.71 (Other) GET /phpMyAdmin/scripts/setup.php [404] | 50.22.53.71 (Other) GET /phpmyadmin/scripts/setup.php [404] | 50.22.53.71 (Other) GET /phpmyadmin1/scripts/setup.php [404] | 50.22.53.71 (Other) GET /phpmyadmin2/scripts/setup.php [404] | 50.22.53.71 (Other) GET /pma/scripts/setup.php [404] | 50.22.53.71 (Other) GET /web/phpMyAdmin/scripts/setup.php [404] | 50.22.53.71 (Other) GET /xampp/phpmyadmin/scripts/setup.php [404] | 50.22.53.71 (Other) GET /web/scripts/setup.php [404] | 50.22.53.71 (Other) GET /php-my-admin/scripts/setup.php [404] | 50.22.53.71 (Other) GET /websql/scripts/setup.php [404] | 50.22.53.71 (Other) GET /phpmyadmin/scripts/setup.php [404] | 50.22.53.71 (Other) GET /phpMyAdmin/scripts/setup.php [404] | 50.22.53.71 (Other) GET /phpMyAdmin-2/scripts/setup.php [404] | 50.22.53.71 (Other) GET /php-my-admin/scripts/setup.php [404] | 50.22.53.71 (Other) GET /phpMyAdmin-2.5.5/index.php [404] | 50.22.53.71 (Other) GET /phpMyAdmin-2.5.5-pl1/index.php [404] | 50.22.53.71 (Other) GET /phpMyAdmin/ [404] | 50.22.53.71 (Other) GET /phpmyadmin/ [404] | 50.22.53.71 (Other) GET /mysqladmin/ [404] | 50.22.53.71 (Other)

    Read the article

  • russian characters not accepted in php / phpmyadmin ?

    - by Bob Deckx
    I have a website in 3 languages: english, dutch and russian. There's a little CMS where the user can update the text on the website. everything works good, except for the russian text.. If I enter any russian text in the form in the CMS, I get "????" in the phpmyadmin database and on the website. I am completely new to charsets, it's the first time I am building a website in a language that is not supported like in this case.. Could someone please tell me what's the problem here? and what I have to do to make this work in russian language?

    Read the article

  • a query is inserted from PHPMYAdmin but not from PHP

    - by iyad al aqel
    i'm writing a php code to insert form values in a forum values $dbServer = mysql_connect("localhost" , "root", "") ; if(!$dbServer) die ("Unable to connect"); mysql_select_db("kfumWonder"); $name= $_POST['name'] ; $password= md5($_POST['password']); $email= $_POST['email'] ; $major= $_POST['major'] ; $dateOfBirth=$_POST['dateOfBirth'] ; $webSite = $_POST['website']; $joinDate= date("Y m d") ; $query = "INSERT INTO user (name, password, email, major, dob, website, join_date) Values ('$name', '$password', '$email', '$major', '$dateOfBirth', '$webSite' , '$joinDate')" ; //echo $query ; $result = mysql_query($query) ; if (! $result ) echo " no results " ; this works perfectly fine when i took the printed query and run it in PHPMyAdmin but when i run this code nothing happens , any ideas !?

    Read the article

  • error defining foreign key PhpMyAdmin

    - by Ngounou lassale
    I am new to PhpMyAdmin. I will like to create a foreign key for my tables. In fact i have create tableI with this structures(A as int(11) autoincrement, B as varchar) TableII ( A_2 as int(11) auto increment, B_2 as varchar, A as int(11). I have declared A as an index in tableII, now when i go to relationship view to precise A as a foreign key i always have this error Erreur lors de la création de la clé étrangère sur ID_Ville (vérifiez le type des colonnes) Erreur ALTER TABLE tb_quartier ADD FOREIGN KEY ( ID_Ville ) REFERENCES ingenieris2.tb_ville ( ID_Ville ) ON DELETE RESTRICT ; Please Help thanks!

    Read the article

  • Can I Specify Strings for MySql Table Values?

    - by afterimagedesign
    I have a MySql table that stores the users state and city from a list of states and cities. I specifically coded each state as their two letter shortened version (like WA for Washington and CA for California) and every city has the two letter abbreviation and the city name formated like this: Boulder Colorado would be CO-boulder and Salt Lake City, Utah would be UT-salt-lake-city as to avoid different states with same city name. The PHP inserts the value (UT-salt-lake-city) under the column City, but when I call the variable through PHP, it displays like this: Your location is: UT-salt-lake-city, Utah. To solve this, I've been making this list of variables if ($city == "AL-auburn") { $city = "Auburn"; } else if ($city == "AL-birmingham") { $city = "Birmingham"; } else if ($city == "GA-columbus") { $city = "Columbus"; $state = "Georgia"; } else if ($city == "AL-dothan") { $city = "Dothan"; } else if ($city == "AL-florence") { $city = "Forence"; } else if ($city == "AL-muscle-shoals") { $city = "Muscle Shoals"; } else if ($city == "AL-gadsden-anniston") { $city = "Gadsden Anniston"; } else if ($city == "AL-huntsville") { $city = "Huntsville"; } else if ($city == "AL-decatur") { $city = "Decatur"; } else if ($city == "AL-mobile") { $city = "Mobile"; } else if ($city == "AL-montgomery") { $city = "Montgomery"; } else if ($city == "AL-tuscaloosa") { $city = "Tuscaloosa"; } Is there a way I can shorten this process or at least call it from a separate file so I don't have to copy/paste every time I want to call the location?

    Read the article

  • mysql encoding problem

    - by Syom
    i have a proble, when insert something in foreign language into database. i have set the collation of database to utf8_general_ci(try utf8_unicod_ci too). but when i insert some text into table, it was saved like this Õ€Õ¡ÕµÕ¥Ö€Õ¥Õ¶ Ô±Õ¶Õ¸Ö‚Õ¶ but when i read from database, text shows in correct form. it looks like that only in database. i have set encoding in my html document to charset=UTF-8 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> and i set mysql_query("SET NAMES UTF-8"); mysql_query("SET CHARACTER SET UTF-8"); when conecting to database. so i think that i' ve done everything, but it still save in that anknown format. could you help me. thanks in advance

    Read the article

  • URL regex search and replace on MySQL (in WordPress)

    - by Tal Galili
    Hello all, I have a WordPress blog with numerous URL's I wish to replace from this: http://www.oldwebsite.co.il/name/*.asp To this: http://www.newwebsite.com/?p=* For example, from this: http://oldwebsite.co.il/name/65971.asp To this: http://www.newwebsite.com/?p=65971 I believe the following plugin: http://urbangiraffe.com/plugins/search-regex/ will do the trick with regex, but I am looking for the correct regex to use here. I found this stackoverflow thread that has a similar task, but since I am not too apt with regex, I was hoping for help so I don't mess anything up. Thanks, Tal After searching stackoverflow, I found

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >