You have an error in your SQL syntax when creating a procedure. MYSQL

I get that error when I try to create a procedure. I dont know what’s failing and I searched a lot if someone has the same error than me, but usually they mistake at delimiters, and I think i have them right. “You have an error in your SQL syntax; check the manual that corresponds […]

sql add another searchable item

I am trying to add another field ‘field2′ that can also be searched and returned in the search results. $extraSQL .= ‘ AND a.’.$db->nameQuote(‘field1′).’ LIKE ‘ . $db->Quote( ‘%’ . $search . ‘%’ ) . ‘ ‘; If I change ‘field1′ in above code to ‘field2′ then field2 does work but I am having trouble […]

MySQL: Reading from an xml file using trigger and update in another table

I have a requirement where i need to read data from a xml file and update that value in another table using a trigger. Following steps will describe my problem in details On submission of a form ack no. will be generated and the details will be stored in the user_info table. user_info will contain […]

Execute PHP Script using HTML Form

Hello dear why i always fail to learning php, would be grateful if someone can help me. :’( i was followed step by step here : but when i click button submit query nothing happen, just show a blank white screen and i dont see new data on database? <html> <body> <form action=”insert.php” method=”post”> […]

MySQL/PHP ordering Danish letters

How come I don’t get the list ordered properly? I have done as follows (the tagname field is set to utf8_danish_ci): SELECT * FROM tags ORDER BY tagname COLLATE utf8_danish_ci ASC I get this result: Økonomi Downloads Grafik Transfers But the correct way to order is like this: Downloads Grafik Transfers Økonomi Thanks!   Asked […]

Mysql result include e+07, how can we escape e+07 from the result

If i export the result from mysql to csv file all value is shown normal, once i execute select command from mysql the result shown as x.xxxxxe+07 Exp: select mycolumn from mytable where mycolumn=25744130; The result as following 2.57441e+07 2.57441e+07 2.57441e+07 … Is there any way to avoid such kind display?   Asked By – […]

Check if user login data exists in a table and if not check in another table

Hello! I’m having some trouble making a login for normal users, I have to tables, one is for admin users and the other for employees. The thing is that I want to use the same login and in the PHP first check if the username exists in the table admintable and if not check if […]

android sqlite sync to mySQL workbench

i have an android app that registers user in sqlite database im wondering if i can store the same data in mySQL workbench database using java API ive search for tutorials but most of them use it possible for an android app to store data in sqlite and store it in mySQL workbench?and vice […]

Array to string conversion error in Radio

$data = mysql_query(” SELECT * FROM user_pokemon_db WHERE user_id = ‘”.$id.”‘ “); while($rows = mysql_fetch_assoc($data)) { $db_id = $rows['id']; $array[] = array($db_id); } foreach($array as $value) { echo ‘<input type=”radio” name=”change” value=”‘.$value.’”><br>’; } I am getting an error on the Radio line. Array to string conversion But when I print_r the array, the values are […]

How to handle concurrent DB conenctions by mulitple users using PDO in PHP5

I want to use PDO in my application. However I am confused regarding the use of PDO here. Because my application access target will be multiple users. Lets say 100 users in simulataneously . So, as I read about PDO it will create 100 db connections to access. This can create a problem as it […]

Insert query not working even though it is right

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 ‘,”,”,”)’ at line 2 i get the above error when running my php file. my insert query is $updateUserCanvas=”insert into user_canvas(cns_id,course_id,context_id,email_id,resource_id) values(“.$canvasId.”,”.$courseId.”,’”.$contextId.”‘,’”.$email.”‘,’”.$resourseid.”‘)”; cns_id,course_id are integer datatype and context_id,email is varchar […]

MySQL delete rows from other tables if deleted from main table

I have added a custom table in WordPress DB called wp_likeandfollow, it contains these 4 columns ID====following_id====follower_id====network_id Here follower_id and following_id are the actual ID of users and there can be duplicate entries. I want to have a check that if admin deletes a user from admin panel, then all entries of that user in […]

Why is this a bad MYSQL query in PHP?

Is this a bad mysql query i used in php? $tablenamep = $_POST["tablenamep"]; $res = mysqli_query($con, “SELECT * FROM `$tablenamep` WHERE number=9″); So when i try to fetch the result using: while ($row = mysqli_fetch_assoc($res)) There is an sql injection error : mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given I have read several […]

how to fetch data from mysql if < option > is selected, assign to a form then post it to mysql

I am working with Smarty Templates. I have a <select> menu with a few options. I would like to add onclick() feature to fetch data from MySQL table, assign the data to a few id’s in a form and post it to another MySQL table when select a specific option in the list. how can […]

many to many relationship mysql design

many user can have many tab so I designed this table user uId (PK) user-tab uId (FK) tabId (FK) tab tabId (PK) but when I try to add FK in user-tab I got this error 1050 – Table ‘.\db\tab@002duser’ already exists   Asked By – user3522444        Read Answers     0   

How Do I Delete All Posts Over 400 Days Old

I have tried the following phpMyAdmin query in an effort to delete all posts from database category 378 that are over 400 days old. DELETE a,b,c,d FROM wp_posts a LEFT JOIN wp_term_relationships b ON ( a.ID = b.object_id ) LEFT JOIN wp_postmeta c ON ( a.ID = c.post_id ) LEFT JOIN wp_term_taxonomy d ON ( […]

Advice Build Web Sites using ISO-8859-1 or UTF-8

I everybody, i have a decision to make about making a web site in spanish, and the database has a lot of accents and special characters like for example ñ, when i show the data into the view it appears like “Informática, Producción, Organización, Diseñador Web, Métodos” etc. So by the way, i am using […]

Display two td per row

Here my code for retrieve data and want to display them into a table. As specific where each row should only contain two td with the data. //seelct forklft query $select_part_query = “SELECT DISTINCT part_code, part_desc, part_size, oem, part_image FROM tblpartDetails WHERE part_code LIKE ‘%$txtSearch%’ OR part_desc LIKE ‘%$txtSearch%’ OR part_size LIKE ‘%$txtSearch%’ OR oem […]

PHP import from CSV not overwriting old data with blanks

if anyone can help that would be much appreciated, I’ve searched on here and google and can’t find what’s wrong, How do I say what the lines are terminated by? Heres the code.. <?php if (isset($_POST['submitbulk'])) { if (is_uploaded_file($_FILES['filename']['tmp_name'])) { echo “<h2>Orders Updated:</h2>”; readfile($_FILES['filename']['tmp_name']); } //Import uploaded file to Database $handle = fopen($_FILES['filename']['tmp_name'], “r”); while […]

SQL Query — Student Weighted Grade Calculation

I am having trouble calculating students grades together to get their final grade. I have the following tables Students —————- stu_id stu_fname stu_lname Grades —————- grade_id grade_name grade_type grade_possible StudentGrades —————– stu_grade_id grade_id stu_id grade_earned GradeTypes —————- grade_type grade_type_name grade_weight This is the query that I have been able to come up with Select S.stu_fname, […]

Eclipse cant find Java after upgrade to 14.04

After upgrade to Ubuntu 14.04 Eclipse 3.8 can’t find any installed Java VM. I have the Sun JDK 1.7 and the openJDK7 installed. I have tried modifying the eclipse.ini to point it to one of the installed Java VMs: -vm /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java This lets Eclipse start but it does not recognize any Java. -vm /usr/java/jdk1.7.0_21/bin/java With […]

Spring MVC tutorial not working

I’ve been checking several tutorials and other helps here in stackoverflow, but I’m unable to solve this annoying problem: I created a Spring MVC project in Eclipse following this tutorial from step to step, however I still get a Resource not found error from the Tomcat server. WEB-INF/web.xml: <?xml version=”1.0″ encoding=”UTF-8″?> <web-app xmlns:xsi=”” xmlns=”” xsi:schemaLocation=” […]

EF6 Code First Migration failed. See EntityValidationErrors for more details

I’m attempting to run the ‘update-database -verbose’ command within the package manager to update my database with a new code first entity I’ve added via ‘add-migration “mynewchange”‘. The add-migration command was successful and it is able to properly update the database, however it fails upon running the seed method. There’s nothing particularly helpful within the […]

jersey with jboss6 not working, not deployment errors, works with jboss5

I have a very simple REST web service that works fine with JBoss 5.1.1. We are use JBoss 6 and by following the instructions on this site, the war file deploys without any error and I can even see application wadl file but it does not have my web service class in it. It almost […]

Problem while Dual booting windows 8 pro with Ubuntu 13.10

I have a HP Pavilion-15-n004tx laptop. It supports UEFI. However when i installed Windows 8 on it, i disabled the UEFI and installed the Windows in Legacy BIOS mode. I wanted to dual boot it with Ubuntu 13.10. I read the Instructions from this link. Now when i tried the live USB then in ‘Try […]

How to create Facebook webapp?

I’m migrating from Mac to Ubuntu Linux (14.04). I’ve read that there are a number of ‘web apps’ that encapsulate frequent and common web applications into kind-of standalone units known as ‘webapps’. I’ve got the Twitter one sitting in my Unity Launcher right now. It’s very handy. I’ve seen mentions for a similar Facebook webapp […]

Dual boot Ubuntu 14.04 with windows 8

I’m attempting to dual boot Win8 and Ubuntu 14.04 LTS. I already had Win8 installed and have Ubuntu installed, and when booting I am given the option to boot either Win8 or Ubuntu, but when I click Ubuntu it gives me an error “\NST\AutoNeoGrub0.mbr”. I then mounted Boot Repair to a USB flash drive and […]

Need to update dbus

Can’t send ussd using modem manager gui: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface ‘org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd’ on object at path /org/freedesktop/ModemManager1/Modem/2   Asked By – Thnzrmzwr        Read Answers     0   

Cisco VPN .pcf profile cant be imported in Ubuntu 14.04

First import attempt after fresh installation of network-manager-vpnc failed with Ubuntu 14.04 Has Experienced An Internal Error screen. I have tried to restart network-manager-vpnc and computer, import now fails without any error message.   Asked By – zgb        Read Answers     0   

Cant boot in windows 8 after upgrade to 14.04

As advised I am asking here about my problem. After upgrade to ubuntu 14.04 I can’t boot in windows 8.1. Right away after upgrade I noticed that few of my previous options are missing in grub. Then I tried booting in ubuntu and it works. But booting windows doesn’t. I only get error reading file […]

how to change keyboard shortcuts?

I’m new to linux and i’m having trouble with ubuntu 14.04 keyboard shortcuts like alt+tab to switch between applications and alt+shift to change the keyboard layout.. anyone can help please?   Asked By – Hossam Mohamed        Read Answers     0   

LightDM is missing Gnome Shell icon

the Icon of Gnome shell is missing from lightDM.. I had to manually add Gnome Shell to lightDM because it didn’t install properly on my machine. now I don’t now how to add the Icon to lightDM. Im on Ubuntu 14.04   Asked By – aceloop        Read Answers     0   

Connect 2 VGA monitors for dual screen in ubuntu 12.04

I’m trying to connect 2 VGA monitors to my computer. My graphic card is an Nvidia Geforce GTX660 and I’m working with Ubuntu 12.04. I have one connector DVI-I to VGA and one DVI-D to VGA to connect the 2 monitors to the DVI ports of my graphics card. In the Nvidia X Server settings […]

Unwanted keyboard shortcut after upgrade to 14.04

After upgrading to 14.04 from 13.10, pressing the key “a” on the keyboard always started the file browser. After removing a duplicate file browser entry in the main menu (via Alacarte menu editor), pressing “a” always starts the disk usage analyzer. These shortcuts were never manually assigned to either application. They also do not show […]

14.04 dual boot/grub error

I’m trying to install 14.04 along with Windows7 Ultimate on my old laptop, HP Compaq nc8340 Core2Duo, 3Gb, 750 GB harddisk. I installed Windows 7 first, leaving around an unused partition of about 100 Gb for Ubuntu. I then installed Ubuntu, but then when I reboot I get different kinds of grub errors, depending on […]

Network printer – Incorrect configuration?

I want to use a printer over my home network, but it fails. All the computers (3) with Ubuntu 13.10 installed. HP-Printer, Hplip installed. The printer works fine on machines it is directly connected to. When I run the printer manager on the other computers, it is found correctly over the network and installed without […]

Ubuntu VM sees a ghost bluetooth adapter?

I am running Ubuntu 12.04 in VMWare on a Windows 7 desktop. I don’t have any bluetooth adapters plugged into my desktop. Before I insert any adapters, Ubuntu sees an adapter called “ubuntu-0″. When I plug my bluetooth dongle in, Ubuntu sees a second bluetoother adapter, also named “ubuntu-o”. The first adapter (which I dont […]

How to automate sudo password

How do you input sudo password automaticly when prompted? I can do this in a script by typing: echo PASSWORD | sudo -S Command, but how do I do that always when prompted?   Asked By – Deftware        Read Answers     0   

Failed to download repository information-xubuntu

I just installed Xubuntu and i get this from the software center : Failed to download repository information. Check your internet connection. DETAILS: Failed to fetch 404 Not Found Failed to fetch 404 Not Found   Asked By – user272100        Read Answers     0   

How to check the number of fields given to the `read` command?

I have a quick question relating to $# in the shell scripts. So, I can use $# at the command line to check the number of a shell script arguments given by the user. Example: # ./shellScript varONE varTWO # $# > 2 <– so output 2 here reflects varONE and varTWO Is any command […]

Postgrey – how to add sending server to whitelist to disable greylisting

I’m using postgrey on all my MX servers (main and 2 backups). I need to disable greylisting on a main server when receiving mails from backup server. How to do that? When I add IP/FQDN to /etc/postgrey/whitelist_clients, it doesn’t help. Specifying POSTGREY_OPTS=”–inet=10023 –whitelist-clients=/etc/postgrey/whitelist_clients” in /etc/default/postgrey didn’t help either. Thank you   Asked By – Xdg […]

Chromium not remembering all tabs and running slow

I’ve installed Ubuntu 14.04 64 bit and Chromium 34.0.1847.116 Ubuntu 14.04 aura (260972). I’ve noticed a few problems… 1) Despite having the setting “Continue where you left off” checked, only some of the tabs are reopened when I start up Chromium. I typically have about 10 tabs open when I close Chromium so I can’t […]

Shared Drive fails to mount during startup. If skipped, no problems mounting after login

I have a dual boot configuration with windows 7 and Ubuntu 14.04. I have my Ubuntu installed on a portable drive with 2 partitions. The internal disk also has 2 partitions and have windows on it. When I boot, I always get a unable to mount drive message and once I skip, everything works fine […]

No wireless with lubuntu 14.04 and iwconfig shows card twice

I just installed Lubuntu 14.04 on a Thinkpad T42 (with forcepae option). Everything is working fine but wifi. The applet shows only a few of the nearby networks. If my home network shows, it asks for the key, but then does nothing. Security is set to WPA as the card cannot handle WPA2. What bothers […]

Install specific nvidia driver

I have a problem there, before ubuntu 14.04 I was able to install the old nvidia-319, they work the best with minecraft using shadermod. Now when I type “sudo apt-get install nvidia-319″ it installs nvidia-319, but after that nvidia-337, how can I exclude nvidia-337 from installation? Here’s screenshot:   Asked By – user264543        […]

Error sending USSD ubuntu 14.04

GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface ‘org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd’ on object at path /org/freedesktop/ModemManager1/Modem/2 can’t send ussd help me to solve this problem   Asked By – Thnzrmzwr        Read Answers     0   

HP ProLiant ML350e Gen8 – Ubuntu 14.04 LTS

I was researching about new Ubuntu Server 14.04 LTS and the Proliant ML350e Gen8 with B120i RAID controller. I found that HP certified Ubuntu without RAID engine on 12.04 server version, but now I cannot find any documentation of Award Process of Certification for Ubuntu of this model, does anyone know anything about that? Will […]

Wrapper for ViewState on Service Layer

I have service layer objects that look like this one: public class UserRepository { [Inject] public IUnitOfWork Database { get; set; } [Inject] public IUserContext User { get; set; } [Inject] public IModelValidator ModelValidator { get; set; } public Response CreateUser(UserDTO dto) { if (ModelValidator.IsValid()) return new Response {SuccessCode = -1, Message = “Please check […]

Next Page »