Unable to get the data from the stored procedure
Hello Folks,
I have this stored procedure and am trying to get the data from the table stage_bill but for some reason i am not sure its not pulling the data.Am a beginner in pl/sql Can any one please help to find out. I can give the code below.
create or replace procedure Load_FADM_Staging_Area_TEST(p_data_load_date date) is
-- local variables
v_start_date date;
v_end_date date;
-- cursor starting
CURSOR c_get_data
IS
SELECT
a.batch_id
,a.beginning_service_date
,a.bill_id
,a.bill_method
,a.bill_number
,a.bill_received_date
,a.bill_status
,a.bill_type
,a.change_oltp_by
,a.change_oltp_date
,a.client_datafeed_code
,a.client_id
,a.created_date
,a.date_of_incident
,a.date_paid
,a.deleted_oltp_by
,a.deleted_oltp_date
,a.duplicate_bill
,a.ending_service_date
,a.event_case_id
,a.event_id
,a.from_oltp_by
,a.oltp_bill_status
,a.review_status
,'HRI' schema_name
, sysdate Load_date
,'ETLPROCESS001' Load_user
,v_start_date as Row_Effective_Date
,null Row_End_date
from stage_bill a
where
--created_date >= to_date('20101031 235959', 'YYYYMMDD HH24MISS')
created_date >= v_start_date
and
--created_date <= to_date('20101111 235959', 'YYYYMMDD HH24MISS')
created_date <= v_end_date
and not exists
(select
b.batch_id
,b.beginning_service_date
,b.bill_id
,b.bill_method
,b.bill_number
,b.bill_received_date
,b.bill_status
,b.bill_type
,b.change_oltp_by
,b.change_oltp_date
,b.client_datafeed_code
,b.client_id
,b.created_date
,b.date_of_incident
,b.date_paid
,b.deleted_oltp_by
,b.deleted_oltp_date
,b.duplicate_bill
,b.ending_service_date
,b.event_case_id
,b.event_id
,b.from_oltp_by
,b.oltp_bill_status
,b.review_status,
b.schema_name,
b.Load_date,
b.Load_user,
b.Row_Effective_Date,
b.Row_End_Date
from STG_FADM_HRI_STAGE_BILL_TEST b)
-- cursor o/p variables
v_batch_id stage_bill.batch_id%TYPE;
v_beginning_service_date stage_bill.beginning_service_date%TYPE;
v_bill_id stage_bill.bill_id%TYPE;
v_bill_method stage_bill.bill_method%TYPE;
v_bill_number stage_bill.bill_number%TYPE;
v_bill_received_date stage_bill.bill_received_date%TYPE;
v_bill_status stage_bill.bill_status%TYPE;
v_bill_type stage_bill.bill_type%TYPE;
v_change_oltp_by stage_bill.change_oltp_by%TYPE;
v_change_oltp_date stage_bill.change_oltp_date%TYPE;
v_client_datafeed_code stage_bill.client_datafeed_code%TYPE;
v_client_id stage_bill.client_id%TYPE;
v_created_date stage_bill.created_date%TYPE;
v_date_of_incident stage_bill.date_of_incident%TYPE;
v_date_paid stage_bill.date_paid%TYPE;
v_deleted_oltp_by stage_bill.deleted_oltp_by%TYPE;
v_deleted_oltp_date stage_bill.deleted_oltp_date%TYPE;
v_duplicate_bill stage_bill.duplicate_bill%TYPE;
v_ending_service_date stage_bill.ending_service_date%TYPE;
v_event_case_id stage_bill.event_case_id%TYPE;
v_event_id stage_bill.event_id%TYPE;
v_from_oltp_by stage_bill.from_oltp_by%TYPE;
v_oltp_bill_status stage_bill.oltp_bill_status%TYPE;
v_review_status stage_bill.review_status%TYPE;
v_schema_name varchar(50);
v_Load_date date;
v_Load_user varchar(50);
v_Row_Effective_Date date;
v_Row_End_Date date;
Begin
if p_data_load_date is null then
select (sysdate - 7), (sysdate - 1) into v_start_date, v_end_date from dual;
elsif p_data_load_date is not null then
select (p_data_load_date - 7), (p_data_load_date - 1) into v_start_date, v_end_date from dual;
else
raise_application_error('-20042', 'Data control - GetDataControlAuditData : Date parameter must be a date of this or a previous week.');
end if;
-- cursor c_get_data loop begin
OPEN c_get_data;
LOOP -- cursor c_get_data loop begin
FETCH c_get_data
INTO
v_batch_id,
v_beginning_service_date,
v_bill_id ,
v_bill_method ,
v_bill_number,
v_bill_received_date,
v_bill_status,
v_bill_type,
v_change_oltp_by,
v_change_oltp_date,
v_client_datafeed_code,
v_client_id,
v_created_date,
v_date_of_incident,
v_date_paid,
v_deleted_oltp_by,
v_deleted_oltp_date,
v_duplicate_bill,
v_ending_service_date ,
v_event_case_id ,
v_event_id,
v_from_oltp_by,
v_oltp_bill_status,
v_review_status,
v_schema_name,
v_Load_date,
v_Load_user,
V_Row_Effective_Date,
v_Row_End_Date;
EXIT WHEN c_get_data%NOTFOUND;
insert into STG_FADM_HRI_STAGE_BILL_TEST
batch_id
,beginning_service_date
,bill_id
,bill_method
,bill_number
,bill_received_date
,bill_status
,bill_type
,change_oltp_by
,change_oltp_date
,client_datafeed_code
,client_id
,created_date
,date_of_incident
,date_paid
,deleted_oltp_by
,deleted_oltp_date
,duplicate_bill
,ending_service_date
,event_case_id
,event_id
,from_oltp_by
,oltp_bill_status
,review_status
,schema_name
,Load_date
,Load_user
,Row_Effective_Date
,Row_End_Date
values(
v_batch_id,
v_beginning_service_date,
v_bill_id ,
v_bill_method ,
v_bill_number,
v_bill_received_date,
v_bill_status,
v_bill_type,
v_change_oltp_by,
v_change_oltp_date,
v_client_datafeed_code,
v_client_id,
v_created_date,
v_date_of_incident,
v_date_paid,
v_deleted_oltp_by,
v_deleted_oltp_date,
v_duplicate_bill,
v_ending_service_date ,
v_event_case_id ,
v_event_id,
v_from_oltp_by,
v_oltp_bill_status,
v_review_status,
v_schema_name,
v_Load_date,
v_Load_user,
v_Row_Effective_Date,
v_Row_End_Date ) ;
COMMIT;
END LOOP;
CLOSE c_get_data;
Maybe you need something else, like
CREATE OR REPLACE PROCEDURE load_fadm_staging_area_test (
p_data_load_date DATE
) IS
v_start_date DATE;
v_end_date DATE;
BEGIN
SELECT NVL (p_data_load_date, SYSDATE) - 7,
NVL (p_data_load_date, SYSDATE) - 1
INTO v_start_date,
v_end_date
FROM DUAL;
MERGE INTO stg_fadm_hri_stage_bill_test b
USING (SELECT *
FROM stage_bill
WHERE created_date BETWEEN v_start_date AND v_end_date) a
ON (b.bill_id = a.billl_id)
WHEN NOT MATCHED THEN
INSERT (batch_id,
beginning_service_date,
bill_id,
bill_method,
bill_number,
bill_received_date,
bill_status,
bill_type,
change_oltp_by,
change_oltp_date,
client_datafeed_code,
client_id,
created_date,
date_of_incident,
date_paid,
deleted_oltp_by,
deleted_oltp_date,
duplicate_bill,
ending_service_date,
event_case_id,
event_id,
from_oltp_by,
oltp_bill_status,
review_status,
schema_name,
load_date,
load_user,
row_effective_date,
row_end_date
VALUES (a.batch_id,
a.beginning_service_date,
a.bill_id,
a.bill_method,
a.bill_number,
a.bill_received_date,
a.bill_status,
a.bill_type,
a.change_oltp_by,
a.change_oltp_date,
a.client_datafeed_code,
a.client_id,
a.created_date,
a.date_of_incident,
a.date_paid,
a.deleted_oltp_by,
a.deleted_oltp_date,
a.duplicate_bill,
a.ending_service_date,
a.event_case_id,
a.event_id,
a.from_oltp_by,
a.oltp_bill_status,
a.review_status,
'HRI',
SYSDATE,
'ETLPROCESS001',
v_start_date,
NULL
END load_fadm_staging_area_test;Whenever you code a cursor and a loop, ask yourself. Do I need that?
Regards
Peter
Similar Messages
-
The problem here is i am not able to get the data from the list
hi all,
i have the following code
EnrichedProductCatalogue enrichedProductCatalogue1 = new EnrichedProductCatalogue();
enrichedProductCatalogue1.setAssetCount(2);
enrichedProductCatalogue1.setBlockingProduct("Weekend Freebee");
enrichedProductCatalogue1.setBlockingReason("Compatability");
ArrayList<String> availableActionsList = new ArrayList<String>();
availableActionsList.add(EnrichedProductConstants.ADD.toString());
availableActionsList.add(EnrichedProductConstants.REMOVE.toString());
enrichedProductCatalogue1.setAvailaibleActions((ArrayList<String>)availableActionsList);
BundleProduct bundleProduct = null;
Product product = new Product();
product = new Product();
product.setProductName("International");
product.setProductClassName("International");
ArrayList<UiCategory> uiCategory = new ArrayList<UiCategory>();
UiCategory uiCategory1 = new UiCategory();
uiCategory1.setCategoryName("Simply");
UiCategory uiCategory2 = new UiCategory();
uiCategory2.setCategoryName("Freebees");
uiCategory.add(uiCategory1);
uiCategory.add(uiCategory2);
product.setUiCategory(uiCategory);
bundleProduct = new BundleProduct();
bundleProduct.setCommercialProduct(product);
enrichedProductCatalogue1.setBundleProduct(bundleProduct);
listOfEnrichProducts.add(enrichedProductCatalogue1);
listOfEnrichProducts.add(enrichedProductCatalogue1);
here i have an list called listOfEnrichProducts.
here i am adding two objects of enrichedProductCatalogue.
which contains a object called BundleProduct.
which has a reference for Product class.
here this product class has a list which contains objects of another class called UiCategory.
the problem here is i am not able to get the data from the list which contains UiCategory objects .
the following is the UI
<af:table var="row" rowBandingInterval="0" id="t1"
value="#{pageFlowScope.sample1}"
binding="#{pageFlowScope.sampleManagedBean.dataTable}"
partialTriggers="apimethods ::apimethods">
<af:column sortable="false" headerText="ProductName" id="c2">
<af:outputText value="#{row.bundleProduct.commercialProduct.productName}" id="ot15"/>
</af:column>
<af:column sortable="false" headerText="ProductClass" id="c12">
<af:outputText value="#{row.bundleProduct.commercialProduct.productClassName}" id="ot19"/>
</af:column>
<!--
<af:column sortable="false" headerText="UICategoryName" id="c32">
<af:forEach var="item" items="#{row.bundleProduct.commercialProduct.uiCategory}" >
<af:outputText value="#{item.categoryName}" id="ot119"/>
</af:forEach>
</af:column>
-->
<af:column sortable="false" headerText="AssetCount" id="c22">
<af:outputText value="#{row.assetCount}" id="ot1"/>
</af:column>
<af:column sortable="false" headerText="blockingReason" id="c3">
<af:outputText value="#{row.blockingReason}" id="ot2"/>
</af:column>
<af:column sortable="false" headerText="blockingProduct" id="c4">
<af:outputText value="#{row.blockingProduct}" id="ot3"/>
</af:column>
<!--<af:column sortable="false" headerText="availaibleActions" id="c1">
<af:commandButton text="#{row.availaibleActions}" id="cb1"
actionListener="#{pageFlowScope.sampleManagedBean.callAction}"
partialSubmit="true">
<af:setPropertyListener from="#{row.availaibleActions}"
to="#{pageFlowScope.avalibleaction}" type="action"/>
</af:commandButton>
</af:column>-->
</af:table>
Can anyone pls give some solution ...Hi Frank,
value="#{pageFlowScope.sample1}"
here sample is
Map<String, Object> flowScope1 =
ADFContext.getCurrent().getPageFlowScope();
flowScope.put("sample1", listOfEnrichProducts);
this is not the problem . i am able to get all the values except the following .
ArrayList<UiCategory> uiCategory = new ArrayList<UiCategory>();
UiCategory uiCategory1 = new UiCategory();
uiCategory1.setCategoryName("Simply");
UiCategory uiCategory2 = new UiCategory();
uiCategory2.setCategoryName("Freebees");
uiCategory.add(uiCategory1);
uiCategory.add(uiCategory2);
product.setUiCategory(uiCategory); -
How to get the data from the model node like a table ?
I want to get the data from the model node once a record ,and the node is bound to a internal table in the RFM which I called in the R/3 system. Who can give me some advice to achive it?Thank you!!
Hi,
To get the data from the node:
wdContext.node[your node name].current[node name]_InputElement().get[specific element in the node];
or you van use:
wdContext.current[your node]Element().get[your element in the node];
examples:
wdContext.nodeZ_Mepro_Po_Detail_Stock_Distri_Input().currentZ_Mepro_Po_Detail_Stock_Distri_InputElement().getUcpd_Flag();
wdContext.currentT_Delv_ReqsElement().getShelflife();
regards, -
I have a tableView displaying a list of contacts from a Cloud Database. After selecting a contact, I push to a programmatically created MKMapView. Then I display the initial region (the view) that includes the users current location (starting point) and their selected destination (end point).
Now I want to display annotations (as described in the Location Awareness Programming Guide) that displays polylines which will represent the turn-by-turn navigation IN MY OWN APPLICATION, and not in the Map App currently used in IOS6.
Due to licensing and its becoming depricated in IOS 6, I do not want to get routing data from the Google Maps API. How do I get routing data from the IOS 6 Map App (powered by TomTom) so I can display the point-to-point annotations (turn-by-turn navigation) without leaving my own application?
I checked out Stack Overflow and other forums which basically left me with the impression that this is not possible. I also checked out the TomTom iPhone Mobile SDK User Guide from the TomTom Developer Portal and am still confused. It must be possible to retrieve routes, since the Map App can display turn-by-turn directions. How can I retrieve turn-by-turn data that I may display as a route within my own application?Thanks Michael. Apologies for the slow reply I was away for a bit (holiday blitz at work and visiting family madness etc.etc.) back now, I set both options you requested to "never " and retried the CMS software with no change.
I do have progress of a sort though, as a test I took a separate test PC and put a clean install of Win7 on and loaded up the CMS software (it worked perfectly) and then took the version of ole32.dll off that machine and put it onto the computer I had built
for her (using Linux) and...
got a new error code. Darn I was so sure I had found a clever solution this time lol.
Anyway now when the CMS fails it gives me a similar error but the offending module is "ntdll.dll" sooo... I tried taking the "working" version of ntdll.dll from the test box and moving it over (making sure to back up the existing ones
first so I could put them back if needed) to her new PC and the PC would not boot.
It seems to want the original versions of a few Dynamic Link Libraries and if I could somehow give it those while not breaking Win7 it should theoretically work seeing as it no longer errors with ole32.dll.
ntdll.dll however seems necessary for Win7 to boot.
So what I am wondering now is:
Is there some way to have both versions of the DLL file in the system32 folder (bypassing the "cannot have two files with the exact same name in the same folder" thing) or rename the original DLL's something else and somehow make the CMS look for
the new named versions so the system has the updated DLL's it needs to boot/run and the CMS has the old ones it wants to run or is there someway to have a self contained install of the CMS, say on a USB flash drive and give it it's own E:/windows/system32/needed
dll's path to the files it needs?
Willing to try any other options or settings you may have come up with as well.
Thanks again for your reply and my apologies for not answering sooner. -
Function module to get the dates from the year and the period
Is there a function Module to get the dates from the year and the period
Check with :
To get last day of period use .
LAST_DAY_IN_PERIOD_GET.
To get last of month Use :
RE_LAST_DAY_OF_MONTH
HRVE_LAST_DAY_OF_MONTH
LAST_DAY_OF_MONTHS
ISB_PREVIOUS_PERIOD_DATE_GET
Thanks
Seshu -
Using Iwork 09 I have spent several hours setting up a mail merge from a spread sheet in Numbers to create receipts for my customers from a Pages template.
After the merge I am left with one long Pages document that will not save as separate files; one per customer, it will only save the whole document of several receipts.
What is the easiest way to get the data from the mailmerge to form Pages files that can be saved separately?
Many thanks in advance.
RichardMr. Clark,
You will probably be more pleased with the iWork apps when you begin to learn your way around. Until you learn such basic things as how to print only one page of a document, you will probably continue to be disappointed.
Does your Print dialog look like this:
Or like this:
If it looks like the first one, then you will want to click this expander control:
Regards,
Jerry -
is there any way i can get the data from the phone?
Hi webby84,
Welcome to Apple Support Communities.
It sounds like you're experiencing a hardware issue with your iPhone.
These links are a good starting point for troubleshooting:
iPhone Assistant
http://www.apple.com/support/iphone/troubleshooting/
iPhone: Hardware troubleshooting
http://support.apple.com/kb/TS2802
Best,
Jeremy -
TO Read the data from the I/P payload of the proxy
I want to know is there any function module or report available to read the data from the
payload of the proxy. As we can see the data in the input payload for the prticular
message in sxmb_moni tcode.Is there any table where this data will be stored.
And also I have to update one Ztable with XML Message ID,Sender Interface Namespace,
Sender Interface Name as and when this proxy is triggered. For this I will have to implement the
class for the interface in the sproxy tcode and in this implementation i will update this
ztable but my problem is how will i get this values there.
In debugging I found one report rsxmb_display_msg_vers_new is submitted in sxmb_moni to show ll these details but
looking specially foe the paylod data.
Your help is highly appreciated.
Thanks.Hello PawanG ,
It is very simple to find out all DB tables involved in the rsxmb_display_msg_vers_new . Steps below:
1. run tcode SE30
2. click "program" radio box, input RSXMB_DISPLAY_MSG_VERS_NEW as program name, click "Execute" button.
3. input an valid message uuid in the "Message GUID" field and execute.
4. go back to SE30,click "Evaluate" tab
5. click "DB tables".
Then all DB table name and description are listed there. I am sure you can find what you need. Good luck!
Best Regards,
Jerry -
How can I enter the data from the recordset into your insert query
Hi
i would like to know how I can enter the data from the recordset into your insert query without using a hidden field.
thanks
------------------------------------------------------------------------------------Below is the code------------------------------------------------------------------------------------- -----
<?php require_once('../../Connections/ezzyConn.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
return $theValue;
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "frmpostComment")) {
$insertSQL = sprintf("INSERT INTO comments (com_topic, com_user, title, com_content, com_date, online_id) VALUES (%s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['com_topic'], "int"),
GetSQLValueString($_POST['commentby'], "int"),
GetSQLValueString($_POST['title'], "text"),
GetSQLValueString($_POST['com_content'], "text"),
GetSQLValueString($_POST['com_date'], "text"),
GetSQLValueString($_POST['online_id'], "int"));
mysql_select_db($database_ezzyConn, $ezzyConn);
$Result1 = mysql_query($insertSQL, $ezzyConn) or die(mysql_error());
$insertGoTo = "index.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
header(sprintf("Location: %s", $insertGoTo));
$colname_rsCommentby = "-1";
if (isset($_SESSION['MM_Username'])) {
$colname_rsCommentby = $_SESSION['MM_Username'];
mysql_select_db($database_ezzyConn, $ezzyConn);
$query_rsTopics = "SELECT topic_id, topic FROM topics ORDER BY topic_date DESC";
$rsTopics = mysql_query($query_rsTopics, $ezzyConn) or die(mysql_error());
$row_rsTopics = mysql_fetch_assoc($rsTopics);
$totalRows_rsTopics = mysql_num_rows($rsTopics);
mysql_select_db($database_ezzyConn, $ezzyConn);
$query_rsOnline = "SELECT online_id, `online` FROM `online` ORDER BY online_id DESC";
$rsOnline = mysql_query($query_rsOnline, $ezzyConn) or die(mysql_error());
$row_rsOnline = mysql_fetch_assoc($rsOnline);
$totalRows_rsOnline = mysql_num_rows($rsOnline);
$colname_rsCommentby = "-1";
if (isset($_SESSION['MM_Username'])) {
$colname_rsCommentby = $_SESSION['MM_Username'];
mysql_select_db($database_ezzyConn, $ezzyConn);
$query_rsCommentby = sprintf("SELECT user_id, username FROM users WHERE username = %s", GetSQLValueString($colname_rsCommentby, "text"));
$rsCommentby = mysql_query($query_rsCommentby, $ezzyConn) or die(mysql_error());
$row_rsCommentby = mysql_fetch_assoc($rsCommentby);
$totalRows_rsCommentby = mysql_num_rows($rsCommentby);
?>
<?php include("../includes/access.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ezzybay - easy click, ezzy shopping</title>
<link href="../css/global.css" rel="stylesheet" type="text/css" />
<link href="../css/navigation.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrapper">
<?php include("../includes/top.php"); ?>
<div id="content">
<div id="pageTitle">
<h2>CMS Section:</h2>
<p>Comment Topics Page</p>
</div>
<?php include("../includes/leftnav.php"); ?>
<div id="mainContent">
<form action="<?php echo $editFormAction; ?>" method="post" name="frmpostComment" id="frmpostComment">
<table align="center">
<caption>Post Comment</caption>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Topic:</td>
<td><select name="com_topic" class="listbox" id="com_topic">
<?php
do {
?>
<option value="<?php echo $row_rsTopics['topic_id']?>"><?php echo $row_rsTopics['topic']?></option>
<?php
} while ($row_rsTopics = mysql_fetch_assoc($rsTopics));
$rows = mysql_num_rows($rsTopics);
if($rows > 0) {
mysql_data_seek($rsTopics, 0);
$row_rsTopics = mysql_fetch_assoc($rsTopics);
?>
</select></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Title:</td>
<td><input name="title" type="text" class="textfield" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right" valign="top">Comment:</td>
<td><textarea name="com_content" cols="50" rows="5" class="textarea"></textarea></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Status:</td>
<td><select name="online_id" class="smalllistbox">
<?php
do {
?>
<option value="<?php echo $row_rsOnline['online_id']?>" <?php if (!(strcmp($row_rsOnline['online_id'], 2))) {echo "SELECTED";} ?>><?php echo $row_rsOnline['online']?></option>
<?php
} while ($row_rsOnline = mysql_fetch_assoc($rsOnline));
?>
</select></td>
</tr>
<tr> </tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"> </td>
<td><input type="submit" class="button" value="Insert record" /></td>
</tr>
</table>
<input name="commentby" type="hidden" id="commentby" value="<?php echo $row_rsCommentby['user_id']; ?>" />
<input type="hidden" name="com_date" value="<?php echo date("d/m/y : H:i:s", time()) ?>" />
<input type="hidden" name="MM_insert" value="frmpostComment" />
</form>
</div>
</div>
<?php include("../includes/footer.php"); ?>
</div>
</body>
</html>
<?php
mysql_free_result($rsTopics);
mysql_free_result($rsOnline);
mysql_free_result($rsCommentby);
?>I'll keep it simple and only use the date as an example. Hopefully you get the concept from the example. Basically you create a recordset and insert the recordset value instead of the POST value into your insert query. In the example below I declared a variable for $the_date and entered the variable into the INSERT query instead of the hidden POST field.
<?php require_once('../../Connections/ezzyConn.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
return $theValue;
$the_date = date("d/m/y : H:i:s", time());
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "frmpostComment")) {
$insertSQL = sprintf("INSERT INTO comments (com_topic, com_user, title, com_content, com_date, online_id) VALUES (%s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['com_topic'], "int"),
GetSQLValueString($_POST['commentby'], "int"),
GetSQLValueString($_POST['title'], "text"),
GetSQLValueString($_POST['com_content'], "text"),
GetSQLValueString($the_date, "text"),
GetSQLValueString($_POST['online_id'], "int"));
mysql_select_db($database_ezzyConn, $ezzyConn);
$Result1 = mysql_query($insertSQL, $ezzyConn) or die(mysql_error());
$insertGoTo = "index.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
header(sprintf("Location: %s", $insertGoTo));
?> -
Reading the data from the BufferReader????
Hi,
When i read the data from the BufferReader Like:-
// Reading the data
sbAppendBuf.append("<!--"+openingTag+"\r\n");
BufferedReader readercopyRightInput= new BufferedReader(new FileReader(copyRightFile));
while ((filecopyRightData=readercopyRightInput.readLine()) != null) {
sbAppendBuf.append(filecopyRightData+"\r\n");
sbAppendBuf.append(closingTag+"-->"+"\r\n");
I am getting an extra new line character before the Closing Tag. Where the output is like:-
<!--<opentag>
<<contents>>
// Extra space before the closeTag
</closetag> -->
How the extra space is coming i am not so sure where "\r" is needed for the proper alignment.So it is needed.
Please do provide a solution for this..
Thanks,
JavaLoverHere the snippet of my code:-
sbAppendBuf.append("<!--"+openingTag);
BufferedReader readercopyRightInput= new BufferedReader(new FileReader(copyRightFile));
while ((filecopyRightData=readercopyRightInput.readLine()) != null) {
sbAppendBuf.append(filecopyRightData+"\r\n");
sbAppendBuf.append(closingTag+"-->"+"\r\n");
Thanks,
Java Lover -
I had an interview question that is:
How to update a table (Customer) on a server ex: Report Server with the data from the same table (Customer) From another server ex: Transaction server?
Set up steps so inset, update or delete operation takes place across the servers.
It would be great if someone please enlighten me in details about this process in MS SQL Server 2008 R2.
Also please describe would it be different for SQL Server 2012?
If so, then what are the steps?I had an interview question that is:
How to update a table (Customer) on a server ex: Report Server with the data from the same table (Customer) from another server ex: Transaction server?
Set up steps so that inset, update or delete operation gets done correctly across servers.
I was not sure about the answer, it would be great if someone please put some light on this and explain in details about this process in MS SQL Server 2008 R2.
Also it would be very helpful if you please describe would it be different for SQL Server 2012? If so, then what are the steps? -
I am moving from PC to Mac. My PC has two internal drives and I have a 3Tb external. What is best way to move the data from the internal drives to Mac and the best way to make the external drive read write without losing data
Paragon even has non-destriuctive conversion utility if you do want to change drive.
Hard to imagine using 3TB that isn't NTFS. Mac uses GPT for default partition type as well as HFS+
www.paragon-software.com
Some general Apple Help www.apple.com/support/
Also,
Mac OS X Help
http://www.apple.com/support/macbasics/
Isolating Issues in Mac OS
http://support.apple.com/kb/TS1388
https://www.apple.com/support/osx/
https://www.apple.com/support/quickassist/
http://www.apple.com/support/mac101/help/
http://www.apple.com/support/mac101/tour/
Get Help with your Product
http://docs.info.apple.com/article.html?artnum=304725
Apple Mac App Store
https://discussions.apple.com/community/mac_app_store/using_mac_apple_store
How to Buy Mac OS X Mountain Lion/Lion
http://www.apple.com/osx/how-to-upgrade/
TimeMachine 101
https://support.apple.com/kb/HT1427
http://www.apple.com/support/timemachine
Mac OS X Community
https://discussions.apple.com/community/mac_os -
Hi,
I would like to retrive the data from the table COEP ,based on KOKRS,BELNR fields.
I need the output for Cost centre, cost element, wbs element,net work ,activity.
These values are storing OBJNR ,OBJNAR_1,OBJNR_2,OBJNR_N3.
But here always these field are not giving the correct values.
for example : for one record COST CENTRE vlaue is storing in OBJNR_1 field,
for one record COST CENTRE vlaue is storing in OBJNR_2 field,
for one record COST CENTRE vlaue is storing in OBJNR_3 field.
Here SAP has used a generic approach for this.
How can I dispaly the values in this case ?
Thanks and Regards
Srinivas.NHi,
I am asking, how can we say OBJNR_1 value alwyas belongs to cost center ?
USPOB is not filling always. -
Hello,
I lost my iPhone 4S. Is it possible to restore the data from the 4S-Backup to my old 3S? How can I do it?
Thank you very much.
:-) MichaelThank you very much for this information.
I have the newest version of iOS 5.1.1 on my 3S. But I get the data from the last backup of my 3S. The programms are at the same level like the 4S.
Is it possible to get the data from Time Machine? -
How to print out the data from the file ?
hi all,
i have upload my file to here :
[http://www.freefilehosting.net/ft-v052010-05-09 ]
anyone can help me to print out the data from the file ?
the content of the file should be like this :
185.56.83.89 156.110.16.1 17 53037 53 72 1
and for the seven column is
srcIP dstIP prot srcPort dstPort octets packetshi all,
i have try to do this
public static void Readbinary() throws Exception
String file = "D:\\05-09.190501+0800";
DataInputStream dis = new DataInputStream(new FileInputStream(file));
//but then how to read the content ??????can you give me more hint ?????
i have find the netflow v5 structure by C
struct NFHeaderV5{
uint16_t version; // flow-export version number
uint16_t count; // number of flow entries
uint32_t sysUptime;
uint32_t unix_secs;
uint32_t unix_nsecs;
uint32_t flow_sequence; // sequence number
uint8_t engine_type; // no VIP = 0, VIP2 = 1
uint8_t engine_id; // VIP2 slot number
uint16_t reserved; // reserved1,2
struct NFV5{
ipv4addr_t srcaddr; // source IP address
ipv4addr_t dstaddr; // destination IP address
ipv4addr_t nexthop; // next hop router's IP address
uint16_t input; // input interface index
uint16_t output; // output interface index
uint32_t pkts; // packets sent in duration
uint32_t bytes; // octets sent in duration
uint32_t first; // SysUptime at start of flow
uint32_t last; // and of last packet of flow
uint16_t srcport; // TCP/UDP source port number or equivalent
uint16_t dstport; // TCP/UDP destination port number or equivalent
uint8_t pad;
uint8_t tcp_flags; // bitwise OR of all TCP flags in flow; 0x10
// for non-TCP flows
uint8_t prot; // IP protocol, e.g., 6=TCP, 17=UDP, ...
uint8_t tos; // IP Type-of-Service
uint16_t src_as; // originating AS of source address
uint16_t dst_as; // originating AS of destination address
uint8_t src_mask; // source address prefix mask bits
uint8_t dst_mask; // destination address prefix mask bits
uint16_t reserved;
but how to translate the structure to java,then get the data from the file ?
Edited by: 903893 on Dec 21, 2011 10:52 PM
Maybe you are looking for
-
Long Projects exported Media Encoder 5.0.1 fail to finish
Exporting 90 minute P2 AVC-INTRA 100 sequence or a 90 Motion JPEG sequence fails to finish. Both exports fail around 50%. Media Encoder 5.0.1 fails to finish. This is reminicent of PP 2 and CS3 days when long sequences would not finish. In this c
-
Windowserver.log & sleep
While looking for an answer to a sleep/crash problem, I was checking all the logs. I (think) I idenitfied the culprit by reading the windowserver.log. But there seem to be a lot of repeating errors in here, some of which repeat 10 or 15 times in a se
-
Question mark where moon must be - Weather widget
When i go to the dashboard, the weather widget displays a blue square with a white questionmark in it a little top left of where the moon is supposed to be
-
Hi, I have for example a site http://abc.com which response back with the port on which it's being used on the server ex: http://abc.com:9081 How would I rewrite the response remove the port on the server that is being used. Thank you,
-
How can I clear specific forms fields without resetting/clearing entire PDF document, using a button - Can anyone help with the code? I am using Adobe Acrobat 6.0 Professional Thanks