Is it to extract data from a database and insert it into a session variable?
$_SESSION ['Stud_FirstName'] = $row_rs_Login ["Stud_FirstName"];
because it is not work. I swear to you that the more I learn, the less I know.
What to do to change?
Thank you!
Yes. However, the recordset must exist before you can assign value to another variable. The last line of code that creates a recordset object looks like this:
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
If you attempt to create the variable session before this line, as you are, I suspect, is not really surprising that it does not work.
Even if you don't want to write all the code yourself, you must understand the code that Dreamweaver is written for you. Otherwise you will be constantly bumping your head on the keyboard. A PHP script is executed from top to bottom, and the flow of the script is controlled by loops and conditional statements. Get your head around these concepts, and you can find customizing Dreamweaver code much easier.
Tags: Dreamweaver
Similar Questions
-
Help in mandatory query - pulling data from two tables and inserting a
Hi all
I need your help for the modification of the query to get the desired result.
I have two tables A and b. using source Insert and select the command, I need to extract data from tables A and B, then insert and C.
Data and table structures are available below.
Table (Source Table)
Status of payment $
MUL DC 20
ONLY DC 20
ONLY 40 PA
MUL NY 50
Table B (Source Table)
State of lang units
E DC 10
S DC 10
NY E 5
PA S 5
Based on query, I need the values in table C as mentioned below.
Table C (Table of Destination) (necessary output query must also be as below)
The State value
PA 8
DC 1
My query is
INSERT INTO C(STATE,VALUE)
SELECT A.STATE, SUM ($) /SUM (UNITS)
OF A, B
WHERE PAYMENT = "SINGLE".
AND A.STATE = B.STATE
GROUP OF A.STATE, B.STATE
But the output I get is
PA 8
DC 2
Essentially to DC, I should get 1, i.e., for payment only $ DC is 20 and divided by 20 DC must be 1.
Let me know where I'm missing.Hello
It will work you need to add units in the group by clause
SELECT a.state, SUM (dollars) / units FROM a, (SELECT state, SUM (units) units FROM b GROUP BY state) sub WHERE payment = 'SINGLE' AND a.state = sub.state GROUP BY a.state, units;
Concerning
-
Get the date value. MinValue and insert it into the DB
Hello
I'm developing an adf application using jdev11g.
I need to recover the 3 values of page jsf (inputText 2 + 1 date. MinValue) and insert them into DB
so I create a method in appModuleImpl:
{public createAffAgVehNewRow (Date date, around km, veh Integer) Sub
Get the id of the current user
String ag = ADFContext.getCurrent () .getSessionScope ().get("idAg").toString ();
getSequenceNumber
oracle.jbo.domain.Number seq = new oracle.jbo.domain.Number (0);
SequenceImpl seqImpl = new SequenceImpl ("AFF_AV_SEQ", getDBTransaction());
SEQ = seqImpl.getSequenceNumber ();
Insert values into the DB table
Line r = getAffAgVehView1 () .createRow ();
ViewObjectImpl vo = this.getAffAgVehView1 ();
r.setAttribute ("IdAg", Integer.parseInt (ag.toString ()) ");
r.setAttribute ("IdAffAv", seq);
r.setAttribute ("KmDep", km);
r.setAttribute ("IdVeh", veh);
r.setAttribute ("DateAff", date);
r.setAttribute ("KmArriv", null);
r.setAttribute ("ConsoCarb", null);
vo.insertRow (r);
this.getDBTransaction () .commit ();
}
also, I changed the default value of the EO (AffAgVeh) to adf.currentDate () and the user interface as simpleDate format: "MM/DD/YYYY.
the problem as whene I enter 3 inputValues and click on the button I get this message:
Timestamp format must be yyyy-mm-dd hh: mm: [.fffffffff]
someone knows how to solve this problem
Thank you
Mark
Hi Dev
Please pass.
java.sql.SQLException: column type invalid in the adf
Thank you
Subramanian M
-
read data from a database and display them in a listbox
Hello
I want to read the data from a table in a database, so I want to display 1 column in a listbox.
I read the data from database, but I can't display in a listbox control.
can someone help me please?
Your VI is way too complicated. If you get a 2D array and you want just the second column, you should only use the Array Index to take off from the second column. That's all.
Once again, the structure of your sequence is completely useless.
I will reiterate my statement about to spend some time with the LabVIEW tutorials.
-
problem to extract data from the database using UTL_FILE
Dear members
I make use of series for the SUBSTR and INSTR function to extract the fields of a data file and carve out spaces based on the number of post mentioned in the Excel worksheet. I was able to extract the first 3 areas namely, customer, manufacturer, product, but for quantity, requested delivery date, price, I can't do it.
the flat file structure is as follows:
Sample data in the flat file is as follows:Field Position From Position To CUSTOMER_NAME 1 30 MANUFACTURER 31 70 PRODUCT_NAME 71 90 QUANTITY 91 95 REQUESTED_SHIP_DATE 96 115 REQUESTED_PRICE 116 120
My program code is the following:BESTBUY SONY ERICSSON W580i 25 1-AUG-2008 50 BESTBUY SAMSUNG BLACKJACK 50 15-JUL-2008 150 BESTBUY APPLE IPHONE 4GB 50 15-JUL-2008 BESTBUY ATT TILT 100 15-JUN-2008 BESTBUY NOKIA N73 50 15-JUL-2008 200
I was able to extract the first 3 fields of the file data, but when I use the same SUBSTR and INSTR functions to extract then three fields I am unable to do so (I get 5, 6 on the ground as well when I extract the 4th field). I've hardcoded the position values in these functions, such as mentioned in the structure of flat file.CREATE OR REPLACE PROCEDURE ANVESH.PROC_CONVERSION_API(FILE_PATH IN VARCHAR2,FILE_NAME IN VARCHAR2) IS v_file_type utl_file.file_type; v_buffer VARCHAR2(1000); V_CUSTOMER_NAME VARCHAR2(100); V_MANUFACTURER VARCHAR2(50); V_PRODUCT_NAME VARCHAR2(50); V_QUANTITY NUMBER(10); V_REQ_SHIP_DATE DATE; V_REQ_PRICE NUMBER(10); V_LOG_FILE utl_file.file_type; V_COUNT_CUST NUMBER; V_COUNT_PROD NUMBER; v_start_pos number := 1; v_end_pos number; BEGIN DBMS_OUTPUT.PUT_LINE('Inside begin 1'); v_file_type := UTL_FILE.fopen(FILE_PATH, FILE_NAME, 'r',null); DBMS_OUTPUT.PUT_LINE('Inside begin 1.1'); LOOP BEGIN DBMS_OUTPUT.PUT_LINE('Inside begin 2'); UTL_FILE.GET_LINE (v_file_type,v_buffer); DBMS_OUTPUT.PUT_LINE('Inside begin 2.1'); select instr('v_buffer',' ', 1, 1) - 1 --into v_end_pos from dual; select substr('v_buffer', 1, 7) --into V_CUSTOMER_NAME from dual; select instr('v_buffer', ' ', 31, 2)-1 --into v_end_pos from dual; select trim(substr('v_buffer', 28, 43)) --into V_MANUFACTURER from dual; select instr('v_buffer', ' ', 45, 1) - 1 --into v_end_pos from dual; select trim(substr('v_buffer', 44, 45)) --into V_PRODUCT_NAME from dual; V_LOG_FILE := UTL_FILE.FOPEN(FILE_PATH, 'LOG_FILE.dat', 'A'); IF (V_QUANTITY > 0) THEN SELECT COUNT (*) INTO V_COUNT_CUST FROM CONVERSION_CUSTOMERS WHERE CUSTOMER_NAME = V_CUSTOMER_NAME; IF(V_COUNT_CUST > 0) THEN SELECT COUNT(*) INTO V_COUNT_PROD FROM conversion_products WHERE PRODUCT_NAME = V_PRODUCT_NAME; IF(V_COUNT_PROD >0) THEN INSERT INTO XXCTS_ORDER_DETAILS_STG VALUES (V_CUSTOMER_NAME, V_PRODUCT_NAME, V_MANUFACTURER, V_QUANTITY, V_REQ_SHIP_DATE, V_REQ_PRICE, 'ACTIVE', 'ORDER TAKEN'); ELSE DBMS_OUTPUT.PUT_LINE('PRODUCT SHOULD BE VALID'); UTL_FILE.PUT_LINE(V_LOG_FILE, 'PRODUCT SHOULD BE VALID'); END IF; ELSE DBMS_OUTPUT.PUT_LINE('CUSTOMER SHOULD BE VALID'); UTL_FILE.PUT_LINE(V_LOG_FILE, 'CUSTOMER SHOULD BE VALID'); END IF; ELSE DBMS_OUTPUT.PUT_LINE('QUANTITY SHOULD BE VALID'); UTL_FILE.PUT_LINE(V_LOG_FILE, 'QUANTITY SHOULD BE VALID'); END IF; EXCEPTION WHEN NO_DATA_FOUND THEN EXIT; END; END LOOP; END; /
It would be great if someone can tell me how to extract the three fields in the flat file.
Thank you
RomaricRomaric,
Why you use v_end_pos to trim spaces when you know the beginning and end of all columns positions?
I do not see the code when you check out the values of other 3 columns (Qty, Date & price).You can use substr underneath rather do SELECT each time.
V_CUSTOMER_NAME := SUBSTR(v_buffer,1,30); V_MANUFACTURER := SUBSTR(v_buffer,31,70); V_PRODUCT_NAME := SUBSTR(v_buffer,71,90); V_QTY := SUBSTR(v_buffer,91,95); V_SHIP_DATE := SUBSTR(v_buffer,96,115); V_PRICE := SUBSTR(v_buffer,116,120);
-Raj
-
extract data from a string and compare it with sysdate
Hello
Since a few days I struggle to find a solution to my problem, maybe I have some luck here.
Data type:
11/23 ANA
Alex 19/11
1/11 tomorrow
03/12 FW1
Makes me tomorrow
Bo 11/12
Necessary data should be as MM/DD. I used substr and/or regexp_like, regexp_substr, but having a few problems.
Months can be like 1, 2.11, 12 or 01,02, 03... 11, 12.
I don't need the data in the format Month\Day.
Basically all of the above "/" should be a month.
And I need to get out all the foregoing, > 13.
And I need to compare the exp with sysdate.
Any ideas?
THX
something like:
FUNCTION to CREATE or REPLACE makeDate (in_string in VARCHAR2
in_format IN VARCHAR2: = ' MM/DD')
date of return
IS
BEGIN
To_date (in_string, in_format) return;
exception
When others then return null;
end;
/with sample_data as (choose 11/23 ANA' double str)
Union of all the
Select 19/11 Alex' double
Union of all the
Select 1/11 tomorrow "of the double
Union of all the
Select FW1 10/12 ' double
Union of all the
Select "Makes Me" tomorrow the double
Union of all the
Select ' Bo' 11/12 double
UNION ALL
SELECT 11/24 09:00 ' FROM dual
)
SELECT str
OF sample_data
WHERE REGEXP_LIKE (str, ' ^ [[: digit:]] {2} / [[: digit:]] {2}')
and makeDate (regexp_substr (str, ' ^ [[: digit:]]{2}/[[:digit:]]{2}'))]]))<>/
HTH
-
Extracting data from Siebel, OPA and impose rules on this
Hi all
We have a scenario:
OPA is used as the server front-end to answer some questions & based on these responses, OPA must validate the data in Siebel and return the result to OPA.
for example:
I have a few contracts in siebel, based on my rules in OPA (say, year 2010 > & warranty = 2 years), I need to recover the data that are corresponding to this criterion of Siebel and display in the OPA.
Can I use OPA connector for Siebel to achieve?
From now on I saw and heard the examples where connector for Siebel takeover is used when Siebel is the front end application and OPA serves just to validate in the back-end.
Anticipate some answers.
Thank you
ShyamYou can do this with Siebel connector.
Specifically, you can use the data in Siebel to begin a session Web determinations then use Web determinations of conduct and maintenance. The results of this interview can then be saved to Siebel.
See you soon
Frank -
LabVIEW is not able to extract data from a HP4194A and gives me the error code 1073807202.
I'm trying to get a graph of the impedance of a capacitor of the HP4194A to my laptop and use one or GPIB-USB-HS connection. I downloaded the latest drivers and am using LabView 8.2. Initially I thought it was a connection problem because demand measurement and automation could find the HP4194A, but he has not answered the * IDN? query. However, the HP4194A responded to the ID of the request? which I found by looking at the user manual. What else should try to get the data I need?
Thank you
The HP4194A is an old instrument, and as such, it is not unusual for ancient instruments to does not implement does not the SCPI standard commands. Therefore, to have "ID?" instead of "* IDN? That said, what driver do you use? Is this? When you say that you aren't able to pull data, please be more descriptive. Are you an error? If so, what is it? What screws do you use? Do you use an example VI? If so, which? We are not mind readers, don't forget.
-
Extraction of data from a XML and inserting into a table
Hi all
I have a problem for which I couldn't find any convincing solution
I have an XML format
<data> <students> <student> <studentname>Raymond<studentname> <StudentId>1</StudentId> <StudentAge>11</StudentAge> <StudentMark>0</StudentMark> </student> </students>
Now I have to insert this XML DB, the table consists of the following columns
(line number, property name, value)
Wait it out put is
(1, studentname, Raymond).
(1, studentid, 1)
(1, studentAge, 11)
(1, Studentmark, 0)
The challenge here
1. how to get the tag names and fill in the property name column?
2. the number of properties for a student can be variable, how can I deal with them?
I am very new to PLSQL XML manipulation. Can someone give me some advice I can start with the creation of a solution? I hope, I've been able to describe my use case. If this isn't the case, please let me know.
Thanks in advance,
Cherif
Here is an example:
SQL > with sample_data like)
2. Select xmlparse (document
3'
4
5
6
Raymond 7
1 8
11 9
0 10
11
12
John 13
2 14
18 15
15 16
17
18
') xmldoc19 of the double
20)
21 select x1.record_id
22, x2.*
sample_data 23 t
24, xmltable)
25 ' / data/students/pupils.
26 passage t.xmldoc
record_id 27 columns for ordinalite
28, property xmltype path ' *'
(29) x 1
30, xmltable)
31 '*'
32 passage x1.properties
path of varchar2 (30) 33 columns property_name "local - name (.)".
34, path name varchar2 (30) '.'
(35) x 2
36;
RECORD_ID PROPERTY-NAME NAME
---------- ------------------------------ ------------------------------
1 studentname Raymond
StudentId 1 1
1 StudentAge 11
1 StudentMark 0
2 John studentname
StudentId 2 2
2 StudentAge 18
2 StudentMark 15
8 selected lines
-
How to change the data from the database and displayed in a DG
Hello, it's me again with a simple question:
I received the request of SQLi that returns multiple lines.
In this line, I have for example:
Reward-> 1
How, instead of show 1 in the data grid, change this value to 'YES '.
I followed this thread:
private void onResultStats(event:ResultEvent):void
{
ServerStatsArr = new ArrayCollection (event.result.source);
for (var i: int = 0; i < ServerStatsArr.length; i ++)
{
If (.abonnement ServerStatsArr [i] == 304) {}
ServerStatsArr [i] .abonnement = 'Premium ';
} else {}
. Subscription ServerStatsArr [i] = 'no ';
}
If (ServerStatsArr [i] .transparence == 1) {}
. Transparency ServerStatsArr [i] = 'yes ';
} else {}
. Transparency ServerStatsArr [i] = 'no ';
}
}
ServerStatsArr.refresh ();
}
Why this method works for the subscription when (.abonnement ServerStatsArr [i] == 304) he displays Premium, but it does NOT work for transparency ?
I tested (.transparence ServerStatsArr [i] == 1) and (.transparence ServerStatsArr [i] == '1')
Thank you
Hi again,
private void setLabel(item:Object,column:DataGridColumn):String
{
Switch (Column.DataField)
{
case 'transparency ':
If (item.transparence is "1")
return ('yes')
on the other
return ('no')
break;
case "subscription":
If (item.abonnement is "304")
return ("premium")
on the other
return ('none')
break;
by default:
Return("");
}
}
and your grid adjustments - add the labelfunction to the following topicsI hope we get a credit of distinction for this mission...David. -
Extract DATA from VSA-0 and VSA-1
Hi, I'm in big trouble.
VSA with 2hosts 5.5
My partner install VSA cluster but he buys only the most essential without VSA, while he was in trial waiting period for execution of command of he (VMware but announced the end of the sale)
Today the license expires and all are offline and there were a few VM important (SAP) and also the vCenter
After several reboot, none like thing upwards
We place the order: 127.0.0.1 wscli getStorageCluster | More
And the LoginFailedException error on both nodes
I don't really know how to solve this
Thanks for the hand
Hi, I have solved my problem
I had to leave the Maintenance Mode each VSA
for whom:
Open a console in the ASB
Lanyard as root (password: svapass) also take a look at this link to open the root access: VMware KB: connection and troubleshooting of the changes to the order for VMware Storage Appliance 5.1
place the order
WSCLI 127.0.0.1 exitMaintenanceMode
and also order
WSCLI 127.0.0.1 vcsExitMaintenanceMode
and all the VM back
-
Read data from the Table and load it into the csv file
Hello
I would like to read a table (select * from employees) and load the data into a csv file.
What methods are available?
Records will be at high volume.
Thank you
If it is to do a lot, use APEX.
Create a new page with an interactive report based on the SQL code you want. When you go to download Excel, it is actually a CSV file.
If it is large, you may need to go on the FILE_UTL road.
If it is only once, use an interface such as SQL tool * or SQL * Developer.
If it's a learning experience, you must do all three.
MK
-
Extract data from database using php script and entry for datagrid.
Hi all
I intend to use the php script below to extract data from a database.
I want to then display it in a datagrid control, the datagrid control has Ref columns job, the company and the position.
The php script I have is
<? PHP
$hostname_conn = "localhost";
$username_conn = "";
$password_conn = "";
$conn = mysql_connect ($hostname_conn, $username_conn, $password_conn);
@mysql_select_db ("videochat");
$query = "SELECT * FROM work."
$result = mysql_query ($query);
$row = mysql_fetch_array ($result);
$ref = $row ["jobref"];
$company = $row ['company'];
$position = $row ["position"];
echo "< Ref > $ref < / Ref >";
echo "< company > $company < / company > ';
echo "< location > $position < / location >."
? >Could someone show me how I chuck this data in a grid?
Thank you
Hello
You should start using the authority, either zendamf which is used by the data wizards in flashbuilder 4 or with amfphp which is probably better than zend but has not all nicities such as the creation of objects of value.
This project uses amfphp, basically, it uses remoteobjects so returned php is in a ready to put directly into a grid or a datagroup arraycollection collection.
If you need help with this sort of thing PM me and I can do a login session...
the PHP services for calls used in the application
<>
class pets
{
var $db_host = "localhost";
var $db_name = "flashhub_pets";
var $db_user = "flashhub_david";
var $db_pwd = "david";
function pets()
{
Define the methodTable for this class in the constructor
$this-> methodTable = array)
"getPets"-online (table)
'description' => 'Pets, database',
'access' => 'remote '.
)
);
}
function getAllPets()
{
$mysql = mysql_connect ($this-> $this-> db_user, db_host), $this-> db_pwd;
@mysql_select_db ($this-> db_name);
$Query = "SELECT * from pet;
$Result = mysql_query ($Query);
return ($Result);
}
function getTypeOfPets ($category)
{
$mysql = mysql_connect ($this-> $this-> db_user, db_host), $this-> db_pwd;
@mysql_select_db ($this-> db_name);
$Query = "SELECT * from pet where CATEGORY = $category;
$Result = mysql_query ($Query);
return ($Result);
}
function getCategories()
{
$mysql = mysql_connect ($this-> $this-> db_user, db_host), $this-> db_pwd;
@mysql_select_db ($this-> db_name);
$Query = "SELECT * from category";
$Result = mysql_query ($Query);
return ($Result);
}
}
?>
David
-
retrieve a row of data from mysql database
Hello
I extract data from a database. Use of then in a Web page as <? php echo $row ['product'];? >
However, if there is an apostrophe in 'product', he displays like a diamond with a question mark.
Data stored in the database looks like this, 'pearls of Mary. "
Is the problem when I have the data stored in the database or when it was recovered?
Thanks, Dan
This happens usually if you paste from another application like Word or Xpress directly in the database.
To work around the problem:
If you are still using the old mysql extension insert the line below before any other query mysql on your page:
mysql_query("SET NAMES UTF8");
If you uisng the new mysqli extension then use the variable of connection string (in this case $conn) as below:
$conn-> query ("SET NAMES UTF8");
-
Creating rules file to extract data from Interface OIC
Hello.
I'm new on the BEAK, I worked on the DSN earlier method to extract data from the database.
Can someone give me the steps of how extract data from the interface of the OIC.
My database is Oracle 11 g 2 and I use 11.1.2.2 version merger.
Concerning
Mahesh BallaThe format is DBSERVERNAME:PORT / service name
for example ORACLE11G:1521 / ORCLSee you soon
John
http://John-Goodwin.blogspot.com/
Maybe you are looking for
-
Deactivation of "Press House to unlock" on the opening screen?
I just updated my iPhone. I have just this 'Home' button that has been added and now it's another step between me and get to the apps on my phone. How can I get rid of the screen ' press the House to unlock? "? I deleted the application of my phone.
-
Since the update to Firefox 6 I found that some Web sites a change upward to 5 minutes to load. The same websites load quickly on IE. I had hoped that Firefox 7 should solve this problem, but it happened. If there is no solution, I'll probably have t
-
I can only fax from my all in one printer. Before moving to Windows 10, I was able to access my fax and all functions (including the history of fax and phone book).
-
Have updated the Ati driver but it crashes: On Fri, 2011-08-19 14:26:57 GMT is crushed by your computercrash dump file: C:\WINDOWS\Minidump\Mini081911-02.dmpThis was probably caused by the following module: unknown (0x003C003E)Bug check code: 0x10000
-
Hi all I played with capacity of Foglight to monitor for specific events in the Windows event logs. I have it working (I think!), but face a slight problem. I copied the OOTB EventLog rule and renamed it as the name Windows event log. The OOTB Even