Search Results

Search found 26283 results on 1052 pages for 'temporary table'.

Page 133/1052 | < Previous Page | 129 130 131 132 133 134 135 136 137 138 139 140  | Next Page >

  • jqgrid modify data returned from ajax call before display in table

    - by user954211
    I have to display some data that I receive from the server as json object like this {"rowndx":"0","rows":"25","rowstotal":"100","rowsdata":[ ["00","DEVICE001","T0_IHOME","1","***","1","10"], ["01","DEVICE002","NO_DEVICE","1","***","1","10"], ["02","DEVICE003","NO_DEVICE","0","***","1","10"], ..... Before displaying the received data in a table I would like to make changes where necessary adding units to the numbers or replacing the numbers with words (eg 0 -OFF 1- ON) To do this I have associated at the ajax option "success" my encoding function. In this case, however, remains always visible the message "Loading ..." and no other action is permitted. I moved my re-encoding procedure to the "complete" ajax option and this time it seems to work. But I did not understand what was my mistake and I do not know if my procedure can work. This is my table ajax configuration url : "devtbl.json", mtype : "POST", datatype : "json", postData : ...... ajaxGridOptions: { type : 'post', contentType: 'application/json', async : false, complete : DEVparse_serverdata, error : function() { alert('Something bad happened. Stopping');}, }, jsonReader : { root : "tablerows", page : "currentpage", total : "totalpages", records : "totalrecords", cell : "", id : "0", userdata : "userdata", repeatitems : true }, and my coding function function DEVparse_serverdata(js , textStatus) { var jsontablereply = {} ; var rowsxpage_int = parseInt(UB.rowsxpage.DEVtable) ; var jsonreply = jQuery.parseJSON(js.responseText) ; jsontablereply.currentpage = "" + (1 + (parseInt(jsonreply.rowndx) / rowsxpage_int)); jsontablereply.totalpages = "" + parseInt((parseInt(jsonreply.rowstotal) + (rowsxpage_int-1)) / rowsxpage_int) ; jsontablereply.totalrecords = jsonreply.rowstotal; jsontablereply.tablerows = [] ; $.each(jsonreply.rowsdata, function(ndx, row) { var rowarray = [] ; rowarray[0] = row[0] ; rowarray[1] = row[1] ; rowarray[2] = row[2] ; rowarray[3] = row[3] ; rowarray[4] = row[4] ; switch (row[2]) { case "NO_DEVICE": rowarray[5] = "***" ; break ; case "T0_IHOME": rowarray[5] = "T=" + row[5] + "°C" ; break ; } jsontablereply.tablerows[ndx] = rowarray ; }) ; // each jQuery("#DEVtbl")[0].addJSONData(jsontablereply); } (I am a beginner with Jquery my coding style is poor)

    Read the article

  • query mysql table and fetch rows posted in 3 days

    - by Mac Taylor
    Hey guys how can i query my mysql database and fetch rows which are posted in earlier 3 days i know how to fetch todays's rows but not 3 days ago time will save in my table like this : 2010-01-20 19:17:49 and this is what i know : SELECT id FROM pages WHERE date=now() but i need to show posts in 3days and im looking for a simple and straight solution ,because i know how to do so in long php codes

    Read the article

  • migrate a portion of a mysql table to SQLite

    - by daniel
    I have a mysql table set up like so: user_id | document 44 [blob] 44 [blob] 44 [blob] 46 [blob] I'd like to export all of user_id 44's data to an SQLite3 file. Best way to go about this without writing a script that reads the data and dumps it into a SQLite file?

    Read the article

  • Copying an entire table with Postgres

    - by NudeCanalTroll
    Hello, I'm trying to copy the contents of one table into another in Postgres, however it appears some rows aren't being copied correctly: ActiveRecord::StatementInvalid: PGError: ERROR: column "email_date" is of type timestamp without time zone but expression is of type character varying HINT: You will need to rewrite or cast the expression. Is there any way I can have it automatically skip (or ignore) invalid rows? Here's the query I'm using: SET statement_timeout = 0; INSERT INTO emails3 SELECT * FROM emails

    Read the article

  • chained selects with one table

    - by Owen
    I know I am going about this in an unusual way, every tut I've seen uses multiple tables, but due to the way the rest of my site works I would like to create a chained select which operates using a single table. My table structure is: ---------------------- |Catagory|SubCategory| |01|cat1 |subcat1 | |02|cat1 |subcat2 | |03|cat2 |subcat1 | |04|cat2 |subcat2 | ---------------------- The code I have so far looks like: <tr> <td class="shadow"><strong>Category:</strong> </td> <td class="shadow"> <select id="category" name="category" style="width:150px"> <option selected="selected" value="<?php echo $category ?>"><?php echo $category?></option> <?php include('connect.php'); $result1 = mysql_query("SELECT DISTINCT category FROM categories") or die(mysql_error()); while($row = mysql_fetch_array( $result1 )) { $category = $row['category']; echo "<option value='". $row['category'] ."'>". $row['category'] ."</option>"; } ?> </select> </td> </tr> <tr> <td class="shadow"><strong>Sub Category:</strong> </td> <td class="shadow"> <select id="sub_catgory" name="sub_category" style="width:150px;"> <option selected="selected" value="<?php echo $sub_category ?>"><?php echo $sub_category ?></option> <?php include('connect.php'); $result2 = mysql_query("SELECT sub_category FROM categories WHERE ") or die(mysql_error()); while($row = mysql_fetch_array ($result2 )){ echo "<option value='" . $row['sub_category'] . "'>". $row['sub_category']. "</option>"; } ?> </select> </td> </tr> On the second select I am not sure how to state the WHERE clause. I need it to display the subcategories which have the same category as selected in the first select. PART 2 how would I include AJAX in this to preload the data so i don't need to refresh the page. Could someone either help me finish what I've started here or point me to a good tutorial. thanks

    Read the article

  • Concatenate a table name from a variable in a FROM clause

    - by idieeasy
    I'm trying to use a dynamically generated fully-qualified table name in sql server 2008. For example, this does not work: select max([id]) from @dbName+N'.[T1]' This will give an error like: Msg 102, Level 15, State 1, Line 73 Incorrect syntax near '+'. I know that something like this works: declare @qualifiedTable varchar(200) = @dbName+N'.[T1]' select max([id]) from @qualifiedTable But I have to do this LOTS of times so I would really like to do it in line. Is it possible?

    Read the article

  • Youtube Table structures

    - by Shyju
    Can anyone share me how does youtube stored video related information in there tables ? What would be the table structure and what would be the various columns in tables and the relations between them ? Thanks in advance

    Read the article

  • MYSQL: Udate table column from subquery result

    - by Jhourlad Estrella
    On the Members table are columns "MemberID" and "PointsEarned". I want to update the PointsEarned column from the result of this query: SELECT m.MemberID, m.UserName, ( (SELECT COUNT(*) FROM EventsLog as e WHERE e.MemberID=m.MemberID AND e.EventsTypeID=2)*10 ) + ( (SELECT COUNT(*) FROM EventsLog as e WHERE e.MemberID=m.MemberID AND e.EventsTypeID=3)*3 ) + ( (SELECT COUNT(*) FROM ChatMessages as c WHERE c.MemberID=m.MemberID)*.1 ) as PointsEarned FROM Members as m Can anybody tell me how I should do it with a single query? Thanks!

    Read the article

  • retrieving same column twice from a table

    - by GJ
    hello all i hav a table named address which has id, title and parent_id fields. in title column the name of regions and districts are inserted. the regions have parent_id zero and parent_id of the districts are id of the regions. i want a query which display regions in one column and its respective districts in another column. hope u guys understand what i mean.. thank u all.

    Read the article

  • get index name within specific table name

    - by AmRoSH
    I need to check if this index not exist in specific table name not in all tables because this select statement select all indexes under this condition. IF NOT EXISTS (SELECT name from sysindexes WHERE name = 'IDX_InsuranceID') CREATE NONCLUSTERED INDEX [IDX_InsuranceID] ON [dbo].[QuoteInsurances] ( [InsuranceID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY] GO Thanks,

    Read the article

  • Need recommendation for a table structure

    - by yapiskan
    I have an entity which has 4 different types of property that could have only one value for each case which are boolean, decimal, string or text. I don't want to define the table with 4 boolean, decimal, nvarchar and ntext columns. What would you recommend to cover this case?

    Read the article

  • Erro while join table in SQL

    - by Color Shadow
    I have two tables that have relationship with UserName field. Based on UserName column, I want to get ID from CarReserve table. Here is my SQL statement: SELECT CarReserve.ID FROM CarReserve INNER JOIN aspnet_Users ON CarReserve.UserName = aspnet_Users.UserName WHERE UserName = @UserName Unfortunately, I am getting this warning: Ambiguous column name "UserName" Can anyone here tell me what is wrong with my statement?

    Read the article

< Previous Page | 129 130 131 132 133 134 135 136 137 138 139 140  | Next Page >