Search Results

Search found 11178 results on 448 pages for 'syntax checking'.

Page 115/448 | < Previous Page | 111 112 113 114 115 116 117 118 119 120 121 122  | Next Page >

  • Problem storing string containing quotes

    - by Jack
    I have the following table - $sql = "CREATE TABLE received_queries ( sender_screen_name varchar(50), text varchar(150) )"; I use the following SQL statement to store values in the table $sql = "INSERT INTO received_queries VALUES ('$sender_screen_name', '$text')"; Now I am trying to store the following string as 'text'. One more #haiku: Cotton wool in mind; feeling like a sleep won't cure; I need some coffee. and I get the following error message Error: 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 't cure; I need some coffee.')' at line 1 I think must be a pretty common problem. How do I solve it?

    Read the article

  • Can you use #defined values in if statements (In C programs)?

    - by Jordan S
    I am new at C programming. I thought when you type something like #define Const 5000 that the compiler just replaces every instance of Const with 5000 at compile time. Is that wrong? I try doing this in my code and I get a syntax error. Why can't i do this? #define STEPS_PER_REV 12345 ... in some function if(CurrentPosition >= STEPS_PER_REV) { // do some stuff here } The compiler complains about the if statement with a syntax error that gives me no details.

    Read the article

  • [js] how combine 2 functions on submit?

    - by Mahmoud
    hey there, as you can see, i have to functions first to check if all forms are not empty and the second function is to verify the captcher, when i combine them together both work at the same time, i want to first to verify the first function, when that function returns true then the other function starts, here is the code that i used on form <form action="reg.php" method="post" enctype="application/x-www-form-urlencoded" onsubmit=" Checking(this); return jcap();" > As you can see both function execute at the same time so i tried this <form action="reg.php" method="post" enctype="application/x-www-form-urlencoded" onsubmit=" if(Checking(this) == true ){ return jcap();}" > is bypass both

    Read the article

  • PreparedStatement throws MySQLSyntaxErrorException

    - by sqlBugs
    I have the following Java code: String query = "Select 1 from myTable where name = ? and age = ?"; PreparedStatement stmt = conn.prepareStatement(query); stmt.setString(1, name); stmt.setInt(2, age); ResultSet rs = stmt.executeQuery(); Whenever I run the above code, it throws an exception on line 2 (where the PreparedStatement is declared): Error 0221202: SQLException = com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: 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 '? AND age = ?' at line 1 Does anyone have any suggestions about what I am doing wrong? Thanks!

    Read the article

  • How to initialise an array inside a struct without doing each element separately? (C++)

    - by Janet
    My questions are in the code, but basically i want to know how/if I can do the two commented out lines? I know I can do it in a constructor but I don't want to! struct foo { int b[4]; } boo; //boo.b[] = {7, 6, 5, 4}; // <- why doesn't this work? (syntax error : ']') //boo.b = {7, 6, 5, 4}; // <- or else this? (syntax error : '{') boo.b[0] = 7; // <- doing it this way is annoying boo.b[1] = 6; // : boo.b[2] = 5; // : boo.b[3] = 4; // <- doing it this way is annoying boo.b[4] = 3; // <- why does this work! (Using: C++, Visual Studio 2005.)

    Read the article

  • PHP/MySQL - updateing 2 tables in one request

    - by Phil Jackson
    Morning, I want to learn more about sql and I'm wanting to update to tables; $query3 = "INSERT INTO `$table1`, `$table2` ($table1.DISPLAY_NAME, $table1.EMAIL_ACCOUNT, $table2.DISPLAY_NAME, $table2.EMAIL_ACCOUNT) values ('" . DISPLAY_NAME . "', '" . EMAIL_ADDRESS . "', '" . $get['rn'] . "', '" . $email . "')"; could some one point me in the right direction on how I would go about this? current error is 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 ' contacts_ACT_Web_Designs (contacts_E_Jackson.DISPLAY_NAME, contacts_E_Jackson' at line 1 regards, phil

    Read the article

  • MySQL ON DUPLICATE KEY UPDATE issue

    - by user644347
    Hi could some one look at this and tell me where I am going wrong. I have an SQL statement that when I echo using php I get this to screen INSERT INTO 'moviedb'.'genre' SET 'GenreID' = '18' , 'GenreName' = 'Drama' ON DUPLICATE KEY UPDATE 'GenreName' = 'Drama' WHERE 'GenreID' = '18' INSERT INTO 'moviedb'.'genre' SET 'GenreID' = '16' , 'GenreName' = 'Animation' ON DUPLICATE KEY UPDATE 'GenreName' = 'Animation' WHERE 'GenreID' = '16' And here is the statement $sql="INSERT INTO 'moviedb'.'genre' SET 'GenreID' = '{$genresID[$i]}' , 'GenreName' = '{$genreName[$i]}' ON DUPLICATE KEY UPDATE 'GenreName' = '{$genreName[$i]}' WHERE 'GenreID' = '{$genresID[$i]}'"; This is the error I recieve: 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 ''moviedb'.'genre' SET 'GenreID' = '18' , 'GenreName' = 'Drama' ON DUPLICATE KEY ' at line 1 Any help would be greatly appreciated, thanks in advance.

    Read the article

  • CCRC unable to check in and check out issue.

    - by Rational Admin
    Hi; One of the team with Clearcase already set up is facing issues in checking and checking out files. They don't have issue in adding a new file to source control. The team has been complaining that they are unable to do so due to domain problem. Seems like Clearcase server is in a domain and the users are logging to the server from a different domain. I haven't yet had a look at the environment. Do you have any idea or would be able to give me heads up on the cause of this issue. Have you ever faced this issue in the past?

    Read the article

  • Simple Version Contol

    - by JM01
    We work on a lot of small website projects. There are three of us in different physical locations. I would like a system that is very simple where the main concern is checking out and checking in web files (php, css, images, js) so that we don't accidentally overwrite each other's code. We also need a way to synch our local file systems with the files on the webserver and with each other. Rolling back to older versions is nice but features like branching and merging are not important. It seems like GIT may be overkill for our purpose or maybe not. Can you recommend anything?

    Read the article

  • [php + mysql] Save IP in database

    - by Knarf
    When a user logs inn I want to save their IP in the database. How would I do that? What type is best to use for the MySQL field? How would the PHP code to get IP look like? I'm thinking of using it as an extra security feature for the login/session stuff. I'm thinking of checking the IP the user logged in with from the DB with the IP the user have now as addition to checking the session. So that it first check the session, and then check if you have a valid IP. Is that an allright extra feature? And what other things can I do to make it more secure?

    Read the article

  • T-SQL Add Column In Specific Order

    - by Aren B
    Im a bit new to T-SQL, Coming from a MySQL background Im still adapting to the different nuances in the syntax. Im looking to add a new column AFTER a specific one. I've found out that AFTER is a valid keyword but I don't think it's the right one for the job. ALTER TABLE [dbo].[InvStockStatus] ADD [Abbreviation] [nvarchar](32) DEFAULT '' NOT NULL ; This is my current query, which works well, except it adds the field at the end of the Table, Id prefer to add it after [Name]. What's the syntax im looking for to represent this?

    Read the article

  • php printing and updation in to db

    - by DAFFODIL
    I have few values existing in data base,i need to update them but,i am unable to do it. UPDATE Phone SET dcno='1' WHERE number='1' AND date='12/03/2009' AND dcnodate='11/05/2009' AND yourorderno='1' AND orderdate='23/06/2010' AND vendorcode='2222 Couldn't execute query: 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 ''2222' at line 3 I also need to print 3db value in to one form,i m unable to do it. Any help ii be appreciated. http://dpaste.com/hold/185341/

    Read the article

  • ASP.NET MVC 2 Model object validation

    - by Jimmy
    Hey guys, I'm trying to validate a model object outside of the context of ModelState within a controller, I currently have a parser that creates model objects from an excel file and I want to be able to report how many entries were added to the database and how many failed, is there a way to validate a model object on its data annotations outside of model binding? I'm looking for something similar to the rails model method of model.valid? or a way for me to implement that myself. My current solution is just manually checking if a few key fields are present but this duplicates requirements between my model class and its metadata, there has to be a better way to hook into the model validation checking that is done by mvc 2. Thanks

    Read the article

  • NSPredicate aggregate function [SIZE] gives 'unsupported function expression' error

    - by jinglesthula
    iOS 4: I have entities in Core Data (using SQLite, which is a requirement) of: Request Response (which has a property personId) Revision Relationships are: Request <-- Revision Request <-- Response Revision <-- Response (e.g. each request may have many responses; each request/response pair may have many revisions) I'm trying to do a predicate to get all Responses with a given personId that have zero Revisions. Using: (personId == %d) && (Request.Revision[SIZE] == 0) in my predicate string gives me a runtime exception "Unsupported function expression Request.Revision[SIZE]" The documentation seems pretty sparse on aggregate functions, only noting that they exist, but with no syntax or examples. Not sure if it's my syntax or if the SIZE function really isn't supported in iOS.

    Read the article

  • Error during installation of Mesa on Linux

    - by rodnower
    Hello, I have a problem. I try to install Mesa 7.8 on CentOS 3.9 for i386 on VMVare 7.0.1 like described here: http://linux-sxs.org/multimedia/mesa.html When I perform configuration stage: ++++++++++++++++++++++++++++++++++++++++++++++++++ [root@CentOS Mesa-7.8]# ./configure --prefix=/usr --sysconfdir=/etc ++++++++++++++++++++++++++++++++++++++++++++++++++ (root is actualy root) This is what I get: ++++++++++++++++++++++++++++++++++++++++++++++++++ . . . checking pkg-config files for X11 are available... no checking for X... no configure: error: X11 development libraries needed for dri driver ++++++++++++++++++++++++++++++++++++++++++++++++++ (Three dots says that there is some output before) Put attention to error. Any idea? Thank you very much forahead.

    Read the article

  • Hiding an error message div with setTimeout not working using Smarty

    - by Donald
    Hi guys, I'm trying to hide an error message div using a javascript function setTimeout after a specified time but it gives me errors that its a wrong smarty syntax, i've never used smarty before so i would really appreciate it if anyone can help me get up to speed with this syntax My code is as follows {if $error_message != ""} <script type="text/javascript"> setTimeout(function(){$('error').hide(); }, 1000); </script> <div id="error" class='error_message'> {$error_message} </div> {/if} Thanks in advance

    Read the article

  • MySQL COUNT help

    - by space
    I'm trying to count all the ids form table3 that are related to the first two tables but I think my SQL code is wrong can some one help me fix it? Here is the code: $dbc = mysqli_query($mysqli,"SELECT table1.*, table2.*, COUNT(id) as num, table3.id FROM table1 INNER JOIN table2 ON table1.id = table2.id INNER JOIN table3 ON table2.id = table3.id WHERE table2.id = '$id'"); Here is the error message. Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause 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 4

    Read the article

  • NoMethodError using Memcached Sinatra-style

    - by sevennineteen
    I've just installed Memcached on my Mac and updated my Sinatra app configuration as described in Heroku's documentation, but I'm getting a NoMethodError when trying to use the hash-based syntax they specify: >> CACHE['color'] = 'blue' >> CACHE['color'] Using explicit get and set methods as below seems to work fine. >> CACHE.set('color', 'blue') >> CACHE.get('color') If necessary I can use the latter syntax, but the former seems more elegant. I haven't tested this on Heroku's environment since I'd like whatever implementation I use to work on my local environment as well. Thanks!

    Read the article

  • Partially parse C++ for a domain-specific language

    - by PierreBdR
    I would like to create a domain specific language as an augmented-C++ language. I will need mostly two types of contructs: Top-level constructs for specialized types or declarations In-code constructs, i.e. to add primitives to make functions calls or idiom easier The language will be used for scientific computing purposes, and will ultimately be translated into plain C++. C++ has been chosen as it seems to offer a good compromise between: ease of use, efficiency and availability of a wide range of libraries. A previous attempt using flex and bison failed due to the complexity of the C++ syntax. The existing parser can still fail on some constructs. So we want to start over, but on better bases. Do you know about similar projects? And if you attempted to do so, what tools would you use? What would be the main pitfalls? Would you have recommendations in term of syntax?

    Read the article

  • Making linq avoid using in memory filtering where possible

    - by linqmonkey
    Consider the these two LINQ2SQL data retrieval methods. The first creates a 'proper' SQL statement that filters the data, but requires passing the data context into the method. The second has a nicer syntax but loads the entire list of that accounts projects, then does in memory filtering. Is there any way to preserve the syntax of the second method but with the performance advantage of the first? public partial class Account { public IQueryable<Project> GetProjectsByYear(LinqDataContext context, int year) { return context.Projects.Where(p => p.AccountID==this.AccountID && p.Year==year).OrderBy(p => p.ProjectNo) } public IQueryable<Project> GetProjectsByYear(int year) { return this.Projects.Where(p => p.Year==year).OrderBy(p => p.ProjectNo).AsQueryable() } }

    Read the article

  • oracle call stored procedure inside select

    - by CC
    Hi everybody. I'm working on a query (a SELECT) and I need to insert the result of this one in a table. Before doing the insert I have some checking to do, and if all columns are valid, I will do the insert. The checking is done in a stored procedure. The same procedure is used somewhere else too. So I'm thinking using the same procedure to do my checks. The procedure does the checkings and insert the values is all OK. I tryied to call the procedure inside my SELECT but it does not works. SELECT field1, field2, myproc(field1, field2) from MYTABLE. This kind of code does not works. I think it can be done using a cursor, but I would like to avoid the cursors. I'm looking for the easiest solution. Anybody, any idea ? Thanks alot. C.C.

    Read the article

  • error reporting issues

    - by SunnyOne
    I'm still entangled in error handling problems. After having read and tried lots of different scripts, I still do not have an overall insight on the problem. I made a syntax error on purpose and get the following error message : Parse error: syntax error, unexpected '{' in /home/directory/public_html/mypage.php on line 10 To understand how it work, as a first step, I'd like to remove this message(which I'am able to do) and replace it by a custom one. How can I customize this message ? Thanks a lot.

    Read the article

< Previous Page | 111 112 113 114 115 116 117 118 119 120 121 122  | Next Page >