Search Results

Search found 39491 results on 1580 pages for 'insert id'.

Page 39/1580 | < Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >

  • Adding a ID to a <li> based on part of an <a> tag

    - by mmsa
    I have the following code: <li class="zoneName"><a href="/Default.aspx?PageID=4869007">CYKF</a></li> <li class="zoneName"><a href="/Default.aspx?PageID=4868459">YKA</a></li> I need to add and ID to each of the < li tags in this list. I need that ID to be the number at the end of the href string. Below is what I'd like it to be <li class="zoneName" id="4869007"><a href="/Default.aspx?PageID=4869007">CYKF</a></li> <li class="zoneName" id="4868459"><a href="/Default.aspx?PageID=4868459">YKA</a></li> Any help is appreciated.

    Read the article

  • Dynamically Insert Variables into DB Table using PreparedStatement

    - by gran_profaci
    I was working with PreparedStatement today and noticed that it used setString() setTimestamp() etc. to insert variables into the DB. I basically have 20 tables each with at least 15 columns and it would not be feasible for me to manuallt write down all the setters. Considering that I have an ArrayList "Vals" which contains all the variables to be inputted in String format (obtained by getString() using PreparedStatement itself), is there any way I can do an insert without using expressly using the Setters? That would save me a lot of time.

    Read the article

  • how to activate trigger after all the bulk insert(s) in mysql

    - by JPro
    I am using mysql and there are bulk inserts that goes on to my table. My doubt is if I create a trigger specifying after insert, then the trigger will get activated for every insert after, which I do not want to happen. Is there any way to activate a trigger after all the bulk inserts are completed? Any advice? Thanks.

    Read the article

  • insert exclusive locking

    - by Markus
    Hi, I have thought about the following SQL statements: INSERT INTO A(a1, a2) SELECT b1, udf_SomeFunc(b1) FROM B Where udf_SomeFunc makes a select on table A. As I understand, first, a shared lock is set on A (I am talking just about table A now), then, after this lock is released, an exclusive lock is obtained to insert the data. The question is: is it possible, that another transaction will get the exclusive lock on table A, just before the current transaction takes its exclusive lok on A?

    Read the article

  • $Id tag in comment headers

    - by Bernhard
    When I read source from open source projects I often find a comment line with "$Id" at the header of the file, f. ex.: // $Id: addappwindowa.c 30792 2009-03-07 22:40:04Z neil $ Is there an "offical" syntax for this lines? (What does "30792" means? ) Are there editors that auto-generate these "$Id"s? Are there any tools that use this information?

    Read the article

  • Disable automatic index on related object id from yml

    - by BugBusterX
    Doctrine Automatically creates indexes on columns that are used to define object relations, For example user: id, name message: id, sender_id, receiver_id, message if I define relationship between message and user in a way that message has one Sender and has one Receiver, doctrine will automatically index sender_id and receiver_id fields when I generate sql from model. I would like to disable index on sender, because I manually create index with sender_id and receiver id together. How can I disable auto generated index?

    Read the article

  • delete all records except the id I have in a python list

    - by jay_t
    Hi all, I want to delete all records in a mysql db except the record id's I have in a list. The length of that list can vary and could easily contain 2000+ id's, ... Currently I convert my list to a string so it fits in something like this: cursor.execute("""delete from table where id not in (%s)""",(list)) Which doesn't feel right and I have no idea how long list is allowed to be, .... What's the most efficient way of doing this from python? Altering the structure of table with an extra field to mark/unmark records for deletion would be great but not an option. Having a dedicated table storing the id's would indeed be helpful then this can just be done through a sql query... but I would really like to avoid these options if possible. Thanks,

    Read the article

  • how to insert Link in to jquery grid column

    - by kumar
    Hello Friends, Can any one tell me how to insert link in to Jquery grid column,, that is I have a column with Edittype { name: 'Comments', index: 'Comments', editable: true, editype: 'textarea', editoptions: { rows: "2", cols: "10"} } I need to insert comments in to this.. so if I have link to click on the column so that some popup bubble will come there in the window to enter comments more like user friendly.. can anybody sujjests me on this.. Thanks

    Read the article

  • Problem using FormView to insert.

    - by matthew_360
    I have a formview control, and on the ItemCreated event, I am "priming" some of the fields with default values. However, when I try to use the formview to insert, before the ItemInserting event gets called, for some reason it calls ItemCreated first. That results in the fields being over-written with the default values right before the insert happens. How do I get it to not call the ItemCreated event before the ItemInserting event?

    Read the article

  • choose javascript variable based on element id from jquery

    - by phoffer
    I feel like this is a simple question, but I am still relatively new to javascript and jquery. I am developing a site for a touch interface that uses unordered lists and jquery .click functions to take input data. I have a section to input a m:ss time, with 3 divs, each containing a list of digits for time. I need to get the input for each column and set it as a variable. I originally designed the inputs to change form inputs, because I didn't understand javascript very much. It was easy to change the 3 hidden inputs by using div id's, but I can't figure out how to do it now with javascript variables. Here is my original jquery code... $("div#time>div>ul>li").click(function() { var id = $(this).parents(".time").attr("name"); var number = $(this).html(); $("input#"+id).val(number); }); The last line sets one of 3 hidden inputs equal to whatever was clicked. I need to make it so separate variables take the inputs, then I can manipulate those variables however I want. Here's a short snippet of the html, to have an idea of how jquery grabs it. <div id="time"> <h1>Time</h1> <div name="minute" class="time" id="t_minute"> M : <ul> The full time html is here: link text Thanks everyone! I've been using SO to answer many questions I've had, but I couldn't find something for this, so I figured I would join, since I'm sure I will have more questions along the way.

    Read the article

  • MySQLi Insert prepared statement via PHP

    - by Jimmy
    Howdie do, This is my first time dealing with MySQLi inserts. I had always used mysql and directly ran the queries. Apparently, not as secure as MySQLi. Anywho, I'm attempting to pass two variables into the database. For some reason my prepared statement keeps erroring out. I'm not sure if it's a syntax error, but the insert just won't work. I've updated the code to make the variables easier to read Also, the error is specifically, Error preparing statement. I've updated the code, but it's not a pHP error. It's a MySQL error as the script runs but fails at the execution of: if($stmt = $mysqli - prepare("INSERT INTO subnets (id, subnet, mask, sectionId, description, vrfId, masterSubnetId, allowRequests, vlanId, showName, permissions, pingSubnet, isFolder, editDate) VALUES ('', ?, ?, '1', '', '0', '0', '0', '0', '0', '{"3":"1","2":"2"}', '0', '0', 'NULL')")) { I'm going to enable MySQL error checking. I honestly didn't know about that. <?php error_reporting(E_ALL); function InsertIPs($decimnal,$cidr) { error_reporting(E_ALL); $mysqli = new mysqli("localhost","jeremysd_ips","","jeremysd_ips"); if(mysqli_connect_errno()) { echo "Connection Failed: " . mysqli_connect_errno(); exit(); } if($stmt = $mysqli -> prepare("INSERT INTO subnets (id, subnet, mask,sectionId,description,vrfld,masterSubnetId,allowRequests,vlanId,showName,permissions,pingSubnet,isFolder,editDate) VALUES ('',?,?,'1','','0','0','0','0','0', '{'3':'1','2':'2'}', '0', '0', NULL)")) { $stmt-> bind_param('ii',$decimnal,$cidr); if($stmt-> execute()) { echo "Row added successfully\n"; } else { $stmt->error; } $stmt -> close; } } else { echo 'Error preparing statement'; } $mysqli -> close(); } $SUBNETS = array ("2915483648 | 18"); foreach($SUBNETS as $Ip) { list($TempIP,$TempMask) = explode(' | ',$Ip); echo InsertIPs($Tempip,$Tempmask); } ?> This function isn't supposed to return anything. It's just supposed to perform the Insert. Any help would be GREATLY appreciated. I'm just not sure what I'm missing here

    Read the article

  • Reading label Id

    - by user281180
    Im having a table in which im creating a label dynamically. '<td>' + '<label for="Name" id = ' + value + '>' + text + '</label></td>' I want to retrieve the id of the label and I`m doing the following which is not working: How can I get the Id of the label? function ReadNames() { $('#Table tr').each(function() { NameID.push($(this).find('label').val()); }); }

    Read the article

  • Problem with onsubmit ID

    - by Liso22
    I need an onsubmit to return false if what's written on the first field is a certain PHP value however the field has a strange id format and I'm not quite sure how to add it in the onsubmit. This is the form, I didn't add the element ID to it: <form class="questionform" name="questionform-0" id="questionform-0" onsubmit="if (document.getElementById('').value == '<?php echo $casi; ?>') return false;" > <textarea class="question-box" style="width:97%;" cols="20" rows="4" id="question-box-' . $questionformid . '" name="title" type="text" maxlength="80" size="28" value=""></textarea> I tried many times but couldn't add it. How should I do it? Thanks

    Read the article

  • Optimize INSERT / UPDATE / DELETE operation

    - by clime
    I wonder if the following script can be optimized somehow. It does write a lot to disk because it deletes possibly up-to-date rows and reinserts them. I was thinking about applying something like "insert ... on duplicate key update" and found some possibilities for single-row updates but I don't know how to apply it in the context of INSERT INTO ... SELECT query. CREATE OR REPLACE FUNCTION update_member_search_index() RETURNS VOID AS $$ DECLARE member_content_type_id INTEGER; BEGIN member_content_type_id := (SELECT id FROM django_content_type WHERE app_label='web' AND model='member'); DELETE FROM watson_searchentry WHERE content_type_id = member_content_type_id; INSERT INTO watson_searchentry (engine_slug, content_type_id, object_id, object_id_int, title, description, content, url, meta_encoded) SELECT 'default', member_content_type_id, web_member.id, web_member.id, web_member.name, '', web_user.email||' '||web_member.normalized_name||' '||web_country.name, '', '{}' FROM web_member INNER JOIN web_user ON (web_member.user_id = web_user.id) INNER JOIN web_country ON (web_member.country_id = web_country.id) WHERE web_user.is_active=TRUE; END; $$ LANGUAGE plpgsql; EDIT: Schemas of web_member, watson_searchentry, web_user, web_country: http://pastebin.com/3tRVPPVi. (content_type_id, object_id_int) in watson_searchentry is unique pair in the table but atm the index is not present (there is no use for it). This script should be run at most once a day for full rebuilds of search index.

    Read the article

  • Get insert statement query

    - by Karthick
    Hi, Is there a way to get the insert statements for a table via some query in MySql? for ex: if the table name is Cards,which has 5 rows, i need to get the insert statements for that particular table. Thanks.

    Read the article

  • Best way to create a Unique ID field for an enum

    - by jax
    What is the best way to get a Unique ID from an ENUM that will stay consistent between repeated execution of the program? Currently I am doing this manually by passing an ID to the enum constructor. I don't really want to do this is I can help it. Another option would be to use a static field that gets incremented for each enum value. The problem is that if later I decide to move the enum fields around or delete some this will cause problems with my program as the ID will be saved into user preferences. The ID can be any basic type or a String.

    Read the article

  • Adding A New Row Using SQL Server Management Studio

    - by Soo
    I'm learning how to use SQL Server Management Studio and can't figure out how to insert a new row into a table. Table Structure: ID, Field1, Field2 Query: INSERT INTO Table (Field1,Field2) VALUES(1,2) Error: Major Error 0x80040E14, Minor Error 25503 I'm probably missing something very noobie like. Any help would be appreciated.

    Read the article

  • What is the difference between "a is b" and "id(a) == id(b)" in Python?

    - by bp
    The id() inbuilt function gives... an integer (or long integer) which is guaranteed to be unique and constant for this object during its lifetime. The is operator, instead, gives... object identity So why is it possible to have two objects that have the same id but return False to an is check? Here is an example: >>> class Test(): ... def test(): ... pass >>> a = Test() >>> b = Test() >>> id(a.test) == id(b.test) True >>> a.test is b.test False A more troubling example: (continuing the above) >>> b = a >>> b is a True >>> b.test is a.test False >>> a.test is a.test False

    Read the article

  • Getting id of row just inserted into MySQL database

    - by James P
    I have my table columns set like this: likes(id, like_message, timestamp) id is the primary key that is auto incrementing. This is the SQL that I use to add a row: $sql = "INSERT INTO `likes` (like_message, timestamp) VALUES ('$likeMsg', $timeStamp)"; Everything works, but now I need to throw back the id attribute of the newly inserted row. For example, if I insert a row and the id of that row is 13, I need to echo out 13 so my AJAX request can pick that up and use it. Any help would be appreciated, as well as related code samples. Thanks :)

    Read the article

  • insert date to oracle

    - by Gold
    hi i have 2 Date field's in oracle 10g (MyDate and MyTime) and i need to insert string that contain a date & time strDate = 04/01/2010 00:00:00 strTime = 01/06/2010 17:20:12 how to insert strDate & strTime to field's MyDate & MyTime

    Read the article

  • Chrome is creating duplicate sessions with the same id

    - by dlwiest
    I encountered an issue while I was revising my session library today, and this might be the first time I've ever seen a browser-specific problem on a back end script. I hope somebody can shed some light. Basically how the session library works is: when instantiated, it checks for a cookie called 'id' (in the form of a uniqid result) on the client machine. If a cookie is found, the script checks that and a hashed copy of the user agent string against entries in a session table. If a matching entry is found, the script resumes the session. If no cookie named 'id' is found, or if no matching entry exists in the sessions table, the script creates both. Fairly standard, I think. Now here's the weird part: in Firefox, everything works as predicted. The user gets one session, which he'll always resume upon connection, as long as 24 hours of inactivity has not elapsed. But when I visit the page in Chrome, even though it looks the same and appears to be executing queries in the same order, I see two entries in the session table. The sessions share an agent string, but the ids are different, and timestamp logs indicate that the ghost session is being created shortly (within a second) after the one created for the user. For debugging purposes, I've been printing queries to the screen as they're executed, and this is an example of what I'm seeing when Chrome should be opening one session and is somehow opening two instead: // Attempting to resume a session SELECT id FROM sessions WHERE id = '4fd24a5cd8df12.62439982' AND agent = '9bcd5c6aac911f8bcd938a9563bc4eca' // No result, so it creates a new one INSERT INTO sessions (id, agent, start, last) VALUES ('4fd24ef0347f26.72354606', '9bcd5c6aac911f8bcd938a9563bc4eca', '1339182832', '1339182832') // Clear old sessions DELETE FROM sessions WHERE last < 1339096432 And here's what I'm seeing in the database afterward: id, agent, start, last 4fd24ef0347f26.72354606, 9bcd5c6aac911f8bcd938a9563bc4eca, 1339182832, 1339182832 4fd24ef0857f94.72251285, 9bcd5c6aac911f8bcd938a9563bc4eca, 1339182833, 1339182833 Am I missing something obvious? The only thing I can think of is that Chrome might be creating a hidden session in the background, possibly to crawl the page. If that's the case though, it could become a problem later, when I begin associating active sessions with entries in the users table. I've been looking for possible bugs in my script, but I haven't found anything so far, and everything works as expected in Firefox.

    Read the article

< Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >