Search Results

Search found 18661 results on 747 pages for 'linq to mysql'.

Page 206/747 | < Previous Page | 202 203 204 205 206 207 208 209 210 211 212 213  | Next Page >

  • mySQL .NET API - Delete all data from table

    - by keynesiancross
    Hi all, I'm trying to figure out if there is an easy way to delete all the data in a table using the mySQL .NET API. The only slightly more tricky part to this is that in the C# code, the business logic can be run in both cases where there is, or isn't, data in teh table. So in some regards I almost need an If statement... Currently I am using the following code, but it doesn't seem to ever delete data... string deleteSQL = "DELETE FROM `data`.`currentData`"; MySqlCommand cmd2 = new MySqlCommand(deleteSQL, conn); Any thoughts would be much appreciated! Cheers

    Read the article

  • Why am I getting a MySQL error?

    - by John Hoffman
    Here is my query. Its intention is allow access to properties of the animals that constitute a match of two animals. The match table contains columns for animal1ID and animal2ID to store which animals constitute the match. SELECT id, (SELECT * FROM animals WHERE animals.id=matches.animal1ID) AS animal1, (SELECT * FROM users WHERE animals.id=matches.animalID) AS animal2 FROM matches WHERE id=5 However, MySQl returns this error: Operand should contain 1 column(s). Why? Is there an alternative way to do this, perhaps with a JOIN statement?

    Read the article

  • mySQL : using BETWEEN in table ?

    - by Meko
    I have a table that includes somestudent group name ,lesson time,day names like Schedule. I am using C# whit MYSql and I want to find which lesson is when user press button from table. I can find it like entering exact value like in table 08:30 or 10:25 , it finds. But I want to make that getting system time and checking that is it between 08:30 and 10:25 or 10:25 and 12:30 . Then I can sythat it is first lesson or it is second lesson . I have also table includes Table_Time column has 5 record like 08:20 , 10:25 , 12:20 so on. Could I use like : select Lesson_Time from mydb.clock where Lesson_Time between (current time)-30 AND (current time)+30 Or can I use between operator between two columns ? Like creating Lesson_Time_Start and Lesson_Time_End and compairing current time like Lesson_Start_Time

    Read the article

  • Error 1045 MySQL during setup

    - by user1364513
    Could anyone explaine me the error 1045 during MySQL setup I ll be preciated. I'm getting this error after reinstalling. I 'm going to install on windows 7. On the last stage of installation i.e apply security settings I'm getting the following message:"The security settings could not be applied. Error Number 1045. Access denied for user 'root' @ 'loaclhost'(usinf password: NO)". I know another way how to fix it that is reinstalling of operating system, but I can't do it please help how can I solve it?. I'll be preciated. Thanks!

    Read the article

  • PHP MySQL query string

    - by user1174762
    I am newer to PHP and MySQL and I am having trouble understanding join. I think, for me, the problem lies with actually understanding the logic of the query. What I am trying to do Is select all of the status updates from a table named "post", but only ones from users I am "following", and then display them In order by date. So, I have two databases which are set up like so: posts |post_id|user_id|post_body|date_upload| | 1 | 4 | hey. | 01/2/2012 | follows |relation_id|user_id|followee_id| | 1 | 4 | 2 | Could someone please explain how I should syntactically and Logically set this up? Thank you!

    Read the article

  • correct mysql syntax error

    - by user2981651
    please could someone tell me the problem with this syntax because mysql 5.5.32 keeps tell me about an error CREATE TABLE `clients` ( `ID` tinyint(11) NOT NULL auto_increment, `title` varchar(10) NOT NULL default '', `firstName` varchar(30) NOT NULL default '', `lastName` varchar(30) NOT NULL default '', `address1` varchar(100) NOT NULL default '', `address2` varchar(100) NOT NULL default '', `town` varchar(100) NOT NULL default '', `province` varchar(100) NOT NULL default '', `country` varchar(40) NOT NULL default '', `postCode` varchar(20) NOT NULL default '', `telephone` varchar(20) NOT NULL default '', `email` varchar(100) NOT NULL default '', `cardNo` varchar(16) NOT NULL default '0000-00-00', `expiryDate` date NOT NULL default '0000-00-00', PRIMARY KEY (`ID`) ) TYPE=MyISAM COMMENT='customer table' AUTO_INCREMENT=1 ;

    Read the article

  • How to insert scraping data to mysql

    - by user1887288
    i am fetching data from other websites can any one tell me how to insert fetch data to mysql database Below code i am using to fetch results coming $urls = $_POST["urls"]; require_once('simple_html_dom.php'); $useragent = 'Googlebot/2.1 (http://www.googlebot.com/bot.html)'; foreach ($urls as $url) { $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 20); curl_setopt($curl, CURLOPT_USERAGENT, $useragent); $str = curl_exec($curl); curl_close($curl); $html= str_get_html($str); foreach($html->find('span.price') as $e) echo $e->innertext . '<br>'; }

    Read the article

  • Mysql slowing down my application

    - by user2985991
    my application is taking ages to load because of my database isnt located on my computer.. Anyone have any idea to how improve my performance? public Form1() { Splash splash = new Splash(); splash.Show(); InitializeComponent(); Load(); public void Load() { db.SelectTeam(); db.SelectMatches(); } On db.SelectTeam and SelectMatches I get everything I need from mysql and put into lists... Sorry if it's confusing, but I don't know what to do, and sorry for my bad english EDIT: Here are the querys string query = "SELECT * FROM teams ORDER BY name"; string query = "SELECT * FROM matches ORDER BY date ASC";

    Read the article

  • HELP ME !! I am Not able to update form data to mysql using php and jquery

    - by Jimson Jose
    i tired and was unable to find the answer i am looking for an answer. my problem is that i am unable to update the values enterd in the form. I have attached all the files i'm using MYSQL database to fetch data. what happens is that i'm able to add and delete records from form using jquery and PHP scripts to MYSQL database, but i am not able to update data which was retrived from database. the file structure is as follows index.php is a file with jquery functions where it displays form for adding new data to MYSQL using save.php file and list of all records are view without refrishing page (calling load-list.php to view all records from index.php works fine, and save.php to save data from form) - Delete is an function called from index.php to delete record from mysql database (function calling delete.php works fine) - Update is an function called from index.php to update data using update-form.php by retriving specific record from mysql tabel, (works fine) Problem lies in updating data from update-form.php to update.php (in which update query is wrriten for mysql) i had tried in many ways at last i had figured out that data is not being transfred from update-form.php to update.php there is a small problem in jquery ajax function where it is not transfering data to update.php page. some thing is missing in calling update.php page it is not entering into that page I am new bee in programming i had collected this script from many forums and made this one.So i was limited in solving this problem i cam to know that this is good platform for me and many where we get a help to create new things.. please guide me with your help to complete my effors !!!!! i will be greatfull to all including ths site which gave me an oppurtunity to present my self..... please find the link below to download all files which is of 35kb (virus free assurance) download mysmallform files in ZIPped format, including mysql query thanks a lot in advance, May GOD bless YOU and THIS SITE

    Read the article

  • Big problem with fluent nhibernate, c# and MySQL need to search in BLOB

    - by VinnyG
    I've done a big mistake, now I have to find a solution. It was my first project working with fluent nhibernate, I mapped an object this way : public PosteCandidateMap() { Id(x => x.Id); Map(x => x.Candidate); Map(x => x.Status); Map(x => x.Poste); Map(x => x.MatchPossibility); Map(x => x.ModificationDate); } So the whole Poste object is in the database but I would have need only the PosteId. Now I got to find all Candidates for one Poste so when I look in my repository I have : return GetAll().Where(x => x.Poste.Id == id).ToList(); But this is very slow since it loads all the items, we now have more than 1500 items in the table, at first to project was not supposed to be that big (not a big paycheck either). Now I'm trying to do this with criterion ou Linq but it's not working since my Poste is in a BLOB. Is there anyway I can change this easyly? Thanks a lot for the help!

    Read the article

  • MySQL + Joomla + remote c# access

    - by Jimmy
    Hello, I work on a Joomla web site, installed on a MySQL database and running on IIS7. It's all working fine. I now need to add functionality that lets (Joomla-)registered users change some configuration data. Though I haven't done this yet, it looks straightforward enough to do with Joomla. The data is private so all external access will be done through HTTPS. I also need an existing c# program, running on another machine, to read that configuration data. Sure enough, this data access needs to be as fast as possible. The data will be small (and filtered by query), but the latency should be kept to a minimum. A short-term, client-side cache (less than a minute, in case a user updates his configuration data) seems like a good idea. I have done practically zero database/asp programming so far, so what's the best way of doing that last step? Should the c# program access the database 'directly' (using what? LINQ?) or setup some sort of Facade (SOAP?) service? If a service should be used, should it be done through Joomla or with ASP on IIS? Thanks

    Read the article

  • A Trio of Presentations: Little Wonders, StyleCop, and LINQ/Lambdas

    - by James Michael Hare
    This week is a busy week for me.  First of all I’m giving another presentation on a LINQ/Lambda primer for the rest of the developers in my company.  Of Lambdas and LINQ View more presentations from BlackRabbitCoder Then this Saturday the 25th of June I’ll be reprising my Little Wonders presentation for the Kansas City Developers Camp.  If you are in the area I highly recommend attending and seeing the other great presentations as well.  Their link is here. Little Wonders View more presentations from BlackRabbitCoder Finally, this Monday the 27th I’ll be speaking at the Saint Louis .NET Users group, giving my Automating Code Standards Using StyleCop and FxCop presentation.  If you are in the Saint Louis area stop by!  There’s two other simultaneous presentations as well if they’re more suited to your interests.  The link for the SLDNUG is here. Automating C# Coding Standards using StyleCop and FxCop View more presentations from BlackRabbitCoder Tweet Technorati Tags: C#,.NET,LINQ,Lambda,StyleCop,FxCop,Little Wonders

    Read the article

  • Macro to Add using System.Linq

    - by Aligned
    I have Visual Studio 2010 setup to remove and sort settings on save with the Power Commands extensions. This is great, but sometimes it removes the using System.Linq at the top. I also find myself scrolling to the top to add the using when I first add System.Linq. So I wrote a quick macro to do it for me. Sub AddUsingLinq()        DTE.ActiveDocument.Selection.StartOfDocument()        DTE.ActiveDocument.Selection.StartOfLine(vsStartOfLineOptions.vsStartOfLineOptionsFirstText)        DTE.ActiveDocument.Selection.Text = "using System.Linq;"        DTE.ActiveDocument.Selection.NewLine()        DTE.ExecuteCommand("Edit.FormatDocument")        DTE.ExecuteCommand("Edit.RemoveAndSort")        DTE.ActiveDocument.Save() DTE.ExecuteCommand("View.NavigateBackward")    End SubHook this up to a shortcut (tools -> options -> keyboard, I chose ctrl + x, c) and you'll be moving faster than ever.

    Read the article

  • PHP/MySQL Swap places in database + JavaScript (jQuery)

    - by James Brooks
    I'm currently developing a website which stores bookmarks in a MySQL database using PHP and jQuery. The MySQL for bookmarks looks like this (CSV format): id,userid,link_count,url,title,description,tags,shareid,fav,date "1";"1";"0";"img/test/google.png";"Google";"Best. Search Engine. Ever.";"google, search, engine";"7nbsp";"0";"1267578934" "2";"1";"1";"img/test/james-brooks.png";"jTutorials";"Best. jQuery Tutorials. Ever.";"jquery, jtutorials, tutorials";"8nbsp";"0";"1267578934" "3";"1";"2";"img/test/benokshosting.png";"Benoks Hosting";"Cheap website hosting";"Benoks, Hosting, server, linux, cpanel";"9nbsp;";"0";"1267578934" "4";"1";"3";"img/test/jbrooks.png";"James Brooks";"Personal website FTW!";"james, brooks, jbrooksuk, blog, personal, portfolio";"1nbsp";"0";"1267578934" "6";"1";"4";"img/test/linkbase.png";"LinkBase";"Store and organise your bookmarks and access them from anywhere!";"linkbase, bookmarks, organisation";"3nbsp";"0";"1267578934" "5";"1";"5";"img/test/jtutorials.png";"jTutorials";"jQuery tutorials, videos and examples!";"jquery, jtutorials, tutorials";"2nbsp";"0";"1267578934" I'm using jQuery Sortable to move the bookmarks around (similar to how Google Chrome does). Here is the JavaScript code I use to format the bookmarks and post the data to the PHP page: $(".bookmarks").sortable({scroll: false, update: function(event, ui){ // Update bookmark position in the database when the bookmark is dropped var newItems = $("ul.bookmarks").sortable('toArray'); console.log(newItems); var oldItems = ""; for(var imgI=0;imgI < newItems.length;imgI++) { oldItems += $("ul.bookmarks li#" + imgI + " img").attr("id") + ","; } oldItems = oldItems.slice(0, oldItems.length-1); console.log("New position: " + newItems); console.log("Old position: " + oldItems); // Post the data $.post('inc/updateBookmarks.php', 'update=true&olditems=' + oldItems + "&newitems=" + newItems, function(r) { console.log(r); }); } }); The PHP page then goes about splitting the posted arrays using explode, like so: if(isset($pstUpdate)) { // Get the current and new positions $arrOldItems = $_POST['olditems']; $arrOldItems = explode(",", $arrOldItems); $arrNewItems = $_POST['newitems']; $arrNewItems = explode(",", $arrNewItems); // Get the user id $usrID = $U->user_field('id'); // Update the old place to the new one for($anID=0;$anID<count($arrOldItems);$anID++) { //echo "UPDATE linkz SET link_count='" . $arrNewItems[$anID] . "' WHERE userid='" . $usrID . "' AND link_count='" . $arrOldItems[$anID] . "'\n"; //echo "SELECT id FROM linkz WHERE link_id='".$arrOldItems[$anID]."' AND userid='".$usrID."'"; $curLinkID = mysql_fetch_array(mysql_query("SELECT id FROM linkz WHERE link_count='".$arrOldItems[$anID]."' AND userid='".$usrID."'")) or die(mysql_error()); echo $arrOldItems[$anID] . " => " . $arrNewItems[$anID] . " => " . $curLinkID['id'] . "\n"; //mysql_query("UPDATE linkz SET link_count='" . $arrNewItems[$anID] . "' WHERE userid='" . $usrID . "' AND link_count='" . $curLinkID['id'] . "'") or die(mysql_error()); // Join a string with the new positions $outPos .= $arrNewItems[$anID] . "|"; } echo substr($outPos, 0, strlen($outPost) - 1); } So, each bookmark is given it's own link_count id (which starts from 0 for each user). Every time a bookmark is changed, I need the link_count to be changed as needed. If we take this array output as the starting places: Array ( [0] => 0 [1] => 1 [2] => 2 [3] => 3 [4] => 4 [5] => 5 ) Each index equalling the link_count position, the resulting update would become: Array ( [0] => 1 [1] => 0 [2] => 3 [3] => 4 [4] => 5 [5] => 2 ) I have tried many ways but none are successful. Thanks in advance.

    Read the article

  • How to config putty remote port forwarding to connect mysql?

    - by kev
    I installed MySQL to a Windows box. I want to connect it from a Linux box. I run plink to setup a remote port forwarding in Windows box. I try to connect it from Linux box, but it's not working. Windows (192.168.1.101) C:\> plink -v -N -R 3306:localhost:3306 [email protected] -pw ADMIN Also tried putty with this config: Port forwarding: R3306->localhost:3306 Linux (192.168.1.102) $ mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) $ nc localhost 3306 J 5.5.283V6L[fnu¦¦!¦$N>-c-R9bbG{mysql_native_password

    Read the article

  • What kind of server do I need to handle 10 million requests and mySQL queries a day?

    - by Calvin
    I'm a new bie of server administration and I'm looking for a powerful hosting service to host my new website. This website is basically a back-end of an mobile online game, and it will: handle up to 10 million of HTTPS request and mySQL queries a day store up to 2000 GB file on the hard disk transfer probably 5000 GB data in and out per month it runs on PHP and mySQL have 10 million records in mySQL database, for each record there are 5-10 fields, around 100 bytes each I really don't know what kind of a server I need to handle these requirements, my question is: what cpu/ram do I need for a dedicated server or vps? what hosting companies are able to offer this kind of dedicated server or VPS? what about cloud computing? I've researched Amazon EC2 but it seems complicated to me. And I've contacted Rackspace but strangely they said Cloudsites is not suitable for my requirements. I wonder if there is other cloud hosting company. any other alternative method? thanks very much!

    Read the article

  • Puppet: how to use data from a MySQL table in Puppet 3.0 templates?

    - by Luke404
    I have some data whose source-of-truth is in a MySQL database, size is expected to max out at the some-thousands-rows range (in a worst-case scenario) and I'd like to use puppet to configure files on some servers with that data (mostly iterating through those rows in a template). I'm currently using Puppet 3.0.x, and I cannot change the fact that MySQL will be the authoritative source for that data. Please note, data comes from external sources and not from puppet or from the managed nodes. What possible approaches are there? Which one would you recommend? Would External Node Classifiers be useful here? My "last resort" would be regularly dumping the table to a YAML file and reading that through Hiera to a Puppet template, or to directly dump the table in one or more pre-formatted text file(s) ready to be copied to the nodes. There is an unanswered question on SF about system users but the fundamental issue is probably similar to mine - he's trying to get data out of MySQL.

    Read the article

  • How to recover from failed Mysql schema update, with replication?

    - by OmerGertel
    I have two MySQL servers configured with master-slave replication. Before we deploy a new application version we: 1) STOP SLAVE 2) Take a MySQL dump of the slave. However, if a mistake is done during the deployment of the new schema version (a table is dropped by mistake, for example), having the slave intact doesn't help. Our service is write-intensive, so we can't turn it back up until we have a master working. If we now load the mysql dump back into the master, it will take a long time during which our service remains down. What is the best-practice to recover from such a mistake? How can I setup the system so I can easily promote the slave, turn on our service and only then tend to the broken database? Mainly, I'm worried with re-syncing the slave and the master after changes are done on the slave.

    Read the article

  • How to connect MySQL database of local server in NetBeans 7.0.1 ( windows)?

    - by diEcho
    Hello All, I am using NetBeans IDE 7.0.1 on Windows 7 very first time for my php. Actually in my company there is a local server ( 192.168.1.99) where all projects resides and we access phpmyadmin of that local server, Although I have added my project folders with NetBeans (this was also very hectic) but now I am having problem to connect database of my local server as I can see 192.168.1.99/phpmyadmin through my browser. I have set below value Server Host : localhost, Server port number : 3306, Administrator username : keshav Administrator password : ****** and when i click on connect, a popup error windows appears with below text Unable to connect to the MySQL server: org.netbeans.api.db.explorer.DatabaseException: org.netbeans.api.db.explorer.DatabaseException: java.sql.SQLException: Access denied for user 'keshav'@'localhost' (using password: YES). The server may not be running or your MySQL connection properties may not be set correctly. Do you want to edit your MySQL connection properties? Please help me out. Thanks

    Read the article

  • Why doesn't my PHP install see the MySQL extension?

    - by Evan Padd
    So I just set up PHP (Version 5.2.17), MySQL (5.5.28), and Apace (2.2) on my Windows 7 computer. I want to test a mysql connection, but the mysql extension is apparently not loaded (based on phpinfo()). Here's what I did: Changed the extension dir in the php.ini (extension_dir = ".;c:\php\ext") and uncommented the extension=php_mysql.dll line Copied libmysql.dll to the Apache's bin directory Added C:\php to the system's $PATH Restarted the server, then the computer And it's still not working. What did I miss? EDIT: I'm looking through phpinfo()'s outout and it says: "Server API | Apache 2.0 Handler" and I'm running 2.2. Is that a problem?

    Read the article

  • Can you link to a good MySQL dumper PHP script?

    - by Ivan
    I need to migrate a website to another host. I have only FTP server access and MySQL name+pass (the MySQL server's IP I was provided is 127.0.0.1, and there's neither PhpMyAdmin nor SSHell to use). A web app run there can access the DB using credentials I know and localhost server. So I'd need a PHP script, that will correctly dump all the available databases of the MySQL server so that they can be imported on the new server. Can you recommend a good one?

    Read the article

  • Which FTP Daemon should I use if I want to use MySQL for authentication?

    - by wag2639
    We want to set up a FTP Daemon on our Ubuntu 10.04 server that can use a simple (probably custom) built web interface for a FTP server using MySQL for authentication. It'll be public facing but only intended for use by a few customers or clients. I know vsftpd, ProFTPd, and Pure-FTPd but I'm not sure which is best for this application. Main features we would like: a. Very good MySQL authentication integration b. Able to specify a list folders/files (folder level is sufficient) each user has access to through MySQL Anything else would just be sprinkles on top.

    Read the article

  • Safety concerns on allowing connections to MySQL with no password on localhost?

    - by ÉricO
    In the case of a Linux system, is there any security concern to let MySQL users with standard privileges (that is, not the root users) connect to the database with no password from localhost? I think that enforcing a password even for localhost can add a layer of protection, since, with no password the database access would be compromised if the SSH access is itself compromised. Considering that, would it be less safe to allow no password connection to MySQL than having the same password for SSH and for MySQL? I don't know if that is to be taken into account, but we also use phpMyAdmin to let users administrate their own database. I am asking because I kinda dislike having to put our database passwords unencrypted in the source or configuration files of our applications, where they can easily be leaked unintentionally. Since our servers are configured to run our applications as the Linux user the application belongs to, I was considering allowing no password from localhost as a simple solution. So, would that be a very bad idea or not?

    Read the article

  • How do you handle the task of changing the schema of a production MySQL database?

    - by Continuation
    One of the biggest complaints I have heard about MySQL is that it locks up a table if you try to change its schema like adding a column or adding an index. By "locking up the table" does it mean I can neither read nor write to the table? Sometimes for hours? That seems a pretty severe limitations. I was going to use MySQL for my new project but this gives me pause. Is there a workaround for this? How do you handle the task of changing the schema of your production MySQL database? By the way someone told me Postgresql doesn't have this problem. Is that true - I can both read and write to a Postgresql table while changing its schema? Is there any performance penalty incurred? Would love to hear your experiences.

    Read the article

  • BIND unstable with DLZ+MySQL on Ubuntu 9.10, any ideas?

    - by Chris
    My BIND server keeps dropping out and I can't work out why. Here is some info from the syslog that I think pertains to the failure(s): Apr 22 21:12:17 dnsdebug named[6613]: mysql driver unable to return result set for lookup query Apr 22 21:12:17 dnsdebug kernel: [285552.573949] type=1503 audit(1271963537.759:53): operation="open" pid=6618 parent=1 profile="/usr/sbin/named" requested_mask="::rw" denied_mask="::rw" fsuid=107 ouid=0 name="/dev/tty" Apr 22 21:12:17 dnsdebug named[6613]: mysql driver unable to return result set for lookup query Apr 22 21:13:17 dnsdebug named[6613]: last message repeated 7 times Any ideas? Mysql had a segfault sometimes, but that seems to be no longer an issue. It's the 64bit version of ubuntu too. Sometimes it will return records just fine, other times it appears to just randomly go down.

    Read the article

< Previous Page | 202 203 204 205 206 207 208 209 210 211 212 213  | Next Page >