SELECT FROM tab WHERE co varname -PLEASE HELP

Hi
I am trying to use a select query where col1 > 3. Instead of 3 i HAVE to use a variable name . Im getting data type mismatch in criteria expression error when i use this code:
String query ="SELECT * FROM MEMBERS WHERE M_ID > '" + myvar + "' ";
Please note that i tried using myvar as a String, int and even as a long - all in vain - resulted in same error.
What am i doing wrong in that piece of code please?
THANKS LODES
sabcarina

ok thanks . like YOU said this worked:
String query= "SELECT * FROM MEMBERS WHERE M_ID >" + myvar;
So please i need to LEARN the need for single quotes in the SQL queries:
What is it used for and why ? i mean i know it is for Strings but why do we need to enclose these varnames in single quotes?
THANKS A MILLION
sabcarina

Similar Messages

  • Can not select from my own MV. Please help.

    Hello Gurus,
    I have created a MV with following clauses
    CREATE or REPLACE MATERIALIZED VIEW "OWNER_NAME1"."MV_Name1"
    BUILD IMMEDIATE
    USING INDEX
    REFRESH COMPLETE
    AS
    SELECT column1, column2 .... from table1,table2
    where .....
    I have logged in to DB with the 'owner_name1' schema itself which is the owner of the MV.
    But, when I try to select from the above MV. It gives error "Ora-00942 table or view does not exist"
    I can see the same under 'user_objects' view as an object of owner_name1 schema.
    Could you please help me in understanding where I have gone wrong?
    DB - Oracle 9i on unix platform.
    Thanks in advance!
    Abhijit.

    Oh! I missed to mention the exact steps followed by me which created error for me,
    viz.
    1) I have 2 Database and their users as follows
    bq. i) DB1 in local server - 'localUser'
    bq. ii) DB2 in remote server - 'RemoteUser1' and 'RemoteUser2'
    2) 'RemoteUser2' user in DB2 has 'select' privilage on table 'RemoteTable1' of 'RemoteUser1' ( both are remote DB's users ! )
    i.e. select * from RemoteUser1.RemoteTable1; --works okay when logged into RemoteUser2. no synonyms are created hence using schema_name.table_name convention.
    3) Logged in to 'localUser' in DB1.
    4) Created a DB link 'local_to_remote2' in 'localUser' schema ( in DB1) to 'RemoteUser2' schema (in DB2)
    i.e.
    create database link local_to_remote2 connect to RemoteUser2 identified by password using 'connection_string';
    DBLink was created successfully.
    5) I could select from the tables of 'RemoteUser2' using DB Link. (by logging in to 'localUser')
    i.e. select * from RemoteUser1.RemoteTable1@local_to_remote2 ; --- gives me expected output. no issues!
    6) Now, I created below MV in 'localUser' ( no need to tell in 'DB1' )
    the exact syntax I used is as follows,
    CREATE or REPLACE MATERIALIZED VIEW "localUser"."MV_Name1"
    BUILD IMMEDIATE
    USING INDEX
    REFRESH COMPLETE
    AS
    SELECT column1, column2
    From RemoteUser1.RemoteTable1@local_to_remote2
    where condition1
    and condition2;
    The MV was created successfully, and I could see it as an 'Valid' object of 'localUser' schema.
    i.e. select * from user_objects where object_name ='MV_NAME1' and status ='VALID' --- tells that above create MV is an object of owner 'localUser'
    But, when I try to select from the said MV. it gives me error "Ora-00942 table or view does not exist"
    i.e. select * from MV_Name1; ---- neither this
    select * from localUser.MV_Name1; ---- nor this works :(
    Even when I try to drop the same MV it gives me same error. :(
    Could you please suggest me anything so that I will be able to select from MY OWN MV ?
    Please help Gurus.

  • Can I simulate SELECT * FROM TABLE WHERE ROW IN (1111,2222) using SQLJ

    I have a fct like
    public void fct(String inStr) {
    String str = "SELECT * FROM TABLE WHERE ROW IN" + inStr;
    // then I xecute the query using JDBC connection
    But I want to do the same thisn using SQLJ like:
    public void fct(String inStr) {
    #sql [nctx] iter = { SELECT * FROM TABLE WHERE ROW IN :inStr}
    When I run the second version and give a parameter like "(1111,2222)" it gives
    ORA-01722: invalid number error.
    Is there a way to give parameters to in clauses of SQLJ statements.
    Thanks in regard.

    This is a SQLJ FAQ. You can find the FAQ at:
    http://technet.oracle.com/tech/java/sqlj_jdbc/htdocs/faq.html
    Your question is addressed in the following section:
    http://technet.oracle.com/tech/java/sqlj_jdbc/htdocs/faq.html#variablesizevaluelist
    Note that that section has a typo. The lines:
    ? // populate mynumbers
    #sql { SELECT * FROM tab WHERE col in (:(a[0]),:(a[1]),?};
    should read:
    ... // populate mynumbers
    #sql { SELECT * FROM tab WHERE col in (:(a[0]),:(a[1]),...};
    By the way, with the next release SQLJ will support pasting in of dynamic SQL fragments. Then you'll be able to do pretty much what you are trying to accomplish here (albeit with slightly different syntax). Until then you'd have to use the workarounds from the FAQ.

  • Select * from emp where ename=(procedure1(procedure2(procedure3)));

    I have a big problem
    I have to check the data for quality data
    Lets say i have to check data in emp table
    First i have to check whether the empno is of type number
         IF empno=number then
              if ename starts with a particualar format then
                   ---printouts and this procedure goes on for about 10 coulumns
    I have designed a hard coded procedure where I input table name and column name and the procedure does the checks and give out result
    I have planned to call that procedures here for each checks
    its like i make the procedure to execute and the procedure returns rowid of the correct data
    now i have to apply the second procedure where input is all the rowids of previous procedure and it goes on
    I even dont know whether procedure is correct or function is correct
    Its like select * from emp where ename=(procedure1(procedure2(procedure3)));
    each procedure's output is Rowids only which satisfy a particular format of data
    Please explain me in details
    Please please help me.

    Nested calls are not the best of ideas. Ignoring that for a moment, there are a couple of ways to address this requirement in Oracle. One of these, and likely one of the more scalable ways, is to use Pipeline Table Functions.
    The following code demonstrates the basics of this approach, using pipelined table functions to perform validation checks on data.
    SQL> -- generic type to serve as input cursors to the validation functions
    SQL> create or replace type TFormatCheckRow as object
      2  (
      3          row_identifier  varchar2(30),
      4          value           varchar2(100)
      5  );
      6  /
    Type created.
    SQL>
    SQL> -- validation functions returns the rowid of rows that are valid
    SQL> create or replace type TRowID as object
      2  (
      3          row_identifier  varchar2(30)
      4  );
      5  /
    Type created.
    SQL>
    SQL> create or replace type TRowIDTable is table of TRowID;
      2  /
    Type created.
    SQL>
    SQL>
    SQL> create or replace package LIB is
      2
      3          type    TCursor is REF CURSOR;
      4  end;
      5  /
    Package created.
    SQL>
    SQL> -- sample validation function to check if the value is a valid NUMBER, and
    SQL> -- if so will return the rowid of that row for further processing
    SQL> create or replace function ValidateNumber( c LIB.TCursor ) return TRowIDTable
      2          pipelined is
      3
      4          MAX_FETCH_SIZE  constant number := 100;
      5          type    TBuffer is table of TFormatCheckRow;
      6
      7          buffer  TBuffer;
      8
      9          function IsNumber( val varchar2 ) return boolean is
    10                  n       number;
    11          begin
    12                  n := TO_NUMBER( val );
    13                  return( TRUE );
    14          exception when OTHERS then
    15                  return( FALSE );
    16          end;
    17
    18  begin
    19          loop
    20                  fetch c bulk collect into buffer limit MAX_FETCH_SIZE;
    21
    22                  for i in 1..buffer.Count
    23                  loop
    24                          if IsNumber( buffer(i).value ) then
    25                                  PIPE ROW( TRowID( buffer(i).row_identifier ) );
    26                          end if;
    27                  end loop;
    28
    29                  exit when c%NOTFOUND;
    30          end loop;
    31
    32          close c;
    33
    34          return;
    35  end;
    36  /
    Function created.
    SQL> show error
    No errors.
    SQL>
    SQL>
    SQL> -- a sample table to check
    SQL> create table foo_tab
      2  (
      3          some_value      varchar2(20)
      4  )
      5  /
    Table created.
    SQL>
    SQL>
    SQL> -- put some data into the table
    SQL> insert
      2  into       foo_tab
      3  select
      4          object_id
      5  from       all_objects
      6  where      rownum < 11
      7  /
    10 rows created.
    SQL>
    SQL> insert
      2  into       foo_tab
      3  select
      4          SUBSTR(object_name,1,20)
      5  from       all_objects
      6  where      rownum < 11
      7  /
    10 rows created.
    SQL>
    SQL> commit;
    Commit complete.
    SQL>
    SQL> -- return rowids of all rows from FOO_TAB where the column SOME_VALUE is a valid number
    SQL> select
      2          row_identifier
      3  from       TABLE(ValidateNumber( CURSOR(select TFormatCheckRow(f.rowid,f.some_value) from foo_tab f) ))
      4  /
    ROW_IDENTIFIER
    AAAOQKAAEAAAAFQAAA
    AAAOQKAAEAAAAFQAAB
    AAAOQKAAEAAAAFQAAC
    AAAOQKAAEAAAAFQAAD
    AAAOQKAAEAAAAFQAAE
    AAAOQKAAEAAAAFQAAF
    AAAOQKAAEAAAAFQAAG
    AAAOQKAAEAAAAFQAAH
    AAAOQKAAEAAAAFQAAI
    AAAOQKAAEAAAAFQAAJ
    10 rows selected.
    SQL>
    SQL>
    SQL> -- list the rows that contain valid numbers
    SQL> with ROWID_LIST as
      2  (
      3  select
      4          row_identifier
      5  from       TABLE(ValidateNumber( CURSOR(select TFormatCheckRow(f.rowid,f.some_value) from foo_tab f) ))
      6  )
      7  select
      8          *
      9  from       foo_tab f
    10  where      f.rowid in (select row_identifier from ROWID_LIST)
    11  order by 1
    12  /
    SOME_VALUE
    258
    259
    311
    313
    314
    316
    317
    319
    605
    886
    10 rows selected.
    SQL>

  • My Apple TV 1st gen will now no longer play any of our iTunes music, although it shows a speaker symbol when you select play on the track. Please help?

    My Apple TV 1st gen will now no longer play any of our iTunes music, although it shows a speaker symbol when you select play on the track. Please help?

    Are you streaming or syncing you music? Sounds like you're streaming music directly from iTunes.
    There can be many different issues. First, try power-cycling you wireless router (leave router disconnected for about 1 or 2 minutes) to refresh the wireless communication betweek both devices.
    Make sure all software updates have been installed, for Apple TV and iTunes.

  • Select * from tab is not working in oracle 10g

    select * from tab is not working in oracle 10g. But at the same time,
    select * from <<table>> is working.
    Please advise me.

    This works for me in 10.2.0.2
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> select * from tab;
    TNAME                          TABTYPE            CLUSTERID
    LOAN_DETAIL                    TABLE
    PLAN_TABLE                     TABLE
    ...

  • I have macbook pro 13" I want to know how to copy files from my mac to the external Toshiba Hard Drive. I can't even delete files from my external hard drive. please help me my macbook HD is almost full and I have to copy my images to the Toshiba HD

    I have macbook pro 13" I want to know how to copy files from my mac to the external Toshiba Hard Drive. I can't even delete files from my external hard drive. please help me my macbook HD is almost full and I have to copy my images to the Toshiba HD

    To delete files from your external HDD, attach it to your MBP and drag the unwanted files to trash and then empty trash.
    Then you select the files that you want to transfer by 'drag and drop' to the external HDD and trash the files on your MBP.
    Ciao.

  • Iv just introduced midi into my studio im running logic9 and have brought Midiman Aniversary 4in 4 out to my set up midi is running well but i cannot seem to mute or solo midi regions an isolate them from the audio can someone please help me Murray.

    Iv just introduced midi into my studio im running logic9 and have brought Midiman Aniversary 4in 4 out to my set up midi is running well but i cannot seem to mute or solo midi regions an isolate them from the audio can someone please help me Murray.

    Hi Charlotte,
    You don't say what your version of Windows you have. Assuming XP, go to Start | Run, type DXDIAG and click OK. Click the Sound tab and run the tests to eliminate a hardware problem first of all. If you don't hear anything, check your cables first of all. Also make sure "Mute" isn't checkmarked in your sound setup. You'll find that in Windows Control Panel.
    Which browser do you use? If you have Firefox 4, sign up to the HTML5 trial @ http://www.youtube.com/html5
    HTML5 is the latest video standard and doesn't require Flash player. Google is in the process of converting all its files to work with the new format. It may solve you problem. If you don't have Firefox 4, you can get it from here: http://www.mozilla.com/en-US/firefox/fx/
    IE8 doesn't support HTML5.
    To clean out your temp files, go to Start | Run, type: CLEANMGR and click OK. Click OK again to start the utility. Tick all the boxes except "Compress old files" because the latter takes too long, and then click OK. You can run this utility any time you wish by the way.
    The above steps will hopefully fix your problem. If not, post here again please.

  • Is it possible to ... SELECT * FROM my_table WHERE ssn IN (..arraylist..) ?

    Hi, I have a quick question I hope someone can help me with. I'm a student and what I'm looking for should be easy but I can't find any information on it.
    Here's my code, it's probably self-explanatory but to clarify I'm trying to get a list of "Captains" in the order of who has the most wins.
    The problem is that the database tables have thousands of "Captains" and I'm only supposed to look at 200 specific "Captains" which have their ssn in a specific arraylist and then return the top 80 "Captains" from that selection.
    Something like this...
    SELECT first 80 E.name, L.ssn, COUNT(L.wins) as Wins
    FROM log L, employees E
    where type matches "[Captain]"
    and E.ssn = L.ssn
    and L.ssn IN (...arraylist...) // How do I loop through the arraylist but still return a list of the top 80 winners?
    group by E.name, L.ssn
    order by Wins desc;
    Should I start by taking the list of social security numbers from the arraylist and insert them into a temporary table and then use that temporary table to base my selection on?
    For example:
    int rows = 0;
    PreparedStatement ps = conn.prepareStatement("INSERT INTO TEMP captainsTemp (ssn) VALUES(?)");
    Iterator i = myArrayList.iterator();
    while (i.hasNext())
         // Set the variables
         for (int pos = 1; pos <= 63; pos++)
              String s = (String)i.next();
              ps.setString(pos,s);
         // insert a row
         rows += ps.execute();
    ...and then below that I could use
    "SELECT * FROM captains
    WHERE ssn IN (SELECT * FROM captainTemp)..."
    This looks like an ugly solution and I'm not sure if it works, sessionwise..
    Everything's written in Java and SQL.
    If you have any thoughts on this I would be most grateful.
    I should add that this is NOT a school assignment but something I'm trying to figure out for my work...
    Many thanks,
    sincerely,
    JT.

    hi,
    Ignore my previous response. Try out this one. It should help you.
    Lets take the example of EMP table (in Oracle's SCOTT Schema). The following is the description of the table.
    SQL> desc emp
    Name Null? Type
    EMPNO NOT NULL NUMBER(4)
    ENAME VARCHAR2(10)
    JOB VARCHAR2(9)
    MGR NUMBER(4)
    HIREDATE DATE
    SAL NUMBER(7,2)
    COMM NUMBER(7,2)
    DEPTNO NUMBER(2)
    SQL> select ename from emp;
    ENAME
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    JAMES
    FORD
    MILLER
    Say, the ArrayList contains 3 names CLARK,KING & MILLER. You want to loop through the ArrayList for the ENAME values.
    First construct a string like below from the ArrayList.
    "ename in 'CLARK' OR ename in 'KING' or ename in 'MILLER'";
    Append this string to the normal SELECT Query
    Query :
    select ename from emp where ename in 'CLARK' OR ename in 'KING' or ename in 'MILLER'
    Here you get the desired output & thats pretty fast because you just do it once !!!
    SQL> select ename from emp where ename in 'CLARK' OR ename in 'KING' or ename in 'MILLER';
    ENAME
    CLARK
    KING
    MILLER
    you can extend this to your Query also.
    thanks,
    Sriram

  • Hi  When i create the downpayment process in the invoice i get amount as value but my requirement is in percentage even after i select the percentage basis milestone billing please help what can be done

    Hi  When i create the downpayment process in the invoice i get amount as value but my requirement is in percentage even after i select the percentage basis milestone billing please help what can be done

    downpayment percentage , so if i want 50 percent of order value to be paid  and when i go to faz type the invoice is created for 0 value that 50 percent of the amount is not getting calculated , where as when i enter in order same as 50 percent in amount it gets calculated in invoice, any help ?

  • Select * from viewname where 1 1 gives records back

    for one customer the following sql gives records back
    select * from viewname where 1&lt;&gt;1
    we asked the customer to send over the database to us but we can't reproduce this behaviour. We don't get any records. the problem is we don't have the same version of oracle they use 9.2.0.4 and we used 10.2.0.1. i can't download the 9i version anymore.
    Does anybody know of a bug in oracle which can cause such behaviour or a setting which can correct this?
    Edited by: BluShadow on 09-Aug-2012 10:06
    corrected the &lt;&gt; issue so it's visible. Please read {message:id=9360002} which describes this issue.

    951790 wrote:
    i suspect the customer would first want us to show that their version is the problem.It doesn't work like that. If your customer called Oracle Support and said... "we're experiencing problems and our database version is 9.2.0.4"... oracle would turn around and say "that version is no longer supported, please upgrade". If they insist on knowing that their version is the problem, then the answer is "yes, it's the problem, it has known bugs and newer versions are available that address thousands of issues since"
    Using a query with "where 1 &lt;&gt; 1" as a condition that is bringing back results, is clearly wrong. You have clearly shown that in other more recent versions of the database it is working ok, therefore you have already proven that there is a bug in the version they are using.
    They are suspecting our view has a design flaw. We have in our documentation stated requirements for our software are the 9 or 10 version of oracle or sql server. So for me there are a couple of possibilities:
    -we try to reproduce the query on their database on the same oracle database version as they are using - problem is we don't have this exact same version and oracle does not have this version for download on their site anymore or so it seemsThat's because it's no longer supported. Any good software house will keep on top of it's customers to ensure they are upgraded in line with Oracle's ability to support. So, partially, it's your companies fault for saying you support version 9, when clearly you can't.
    --i ask other more knowledgable people(hopefully this forum) who might know about such problems which might result in a correction in the customer oracle database configuration or know of a bug in the customers version which causes this behaviour.You'll be lucky to find people still using such an old version (you're talking a version that almost 10 years out of date). The best you can do is to log onto Oracle Support and search there for known issues... and the answer on those is likely to be a recommendation to patch or upgrade too.
    -we change the queries to these views so they won't try to give back any records on their serverHow will you know unless you are able to test them?

  • Select * from tbl where product like ('abc','def','rgh');

    Hi Guys,
    My requirement is I need to filter by providing date value with some of the porduct details and prod_id may differ with product like
    prod_id product date
    01 abc 01/2012
    02 abc 02/2012
    03 def 03/2012
    How can we put multiple text conditions using LIKE operator in where clause of the sql query.
    if we use union to combine all the sql queries, how can we filter by entering date value.
    SQL>select * from tbl where product like ('abc','def','rgh');
    Please provide any ideas on the same.
    Thanks in advance!
    -LK

    select * from tab1 where regexp_like(product,'^abc|def|rgh');

  • HT4061 I am living in Pakistan, Lahore. I have purchased an Apple Iphone 5S online from apple store. I am facing water damage problem and there is no apple store here in Pakistan, How can I repair my phone from apple service center? Please help me

    I am living in Pakistan, Lahore. I have purchased an Apple Iphone 5S online from apple store. I am facing water damage problem and there is no apple store here in Pakistan, How can I repair my phone from apple service center? Please help me

    Take it to an authorized service center or Apple Store in the country where the phone originated.  Apple does not sell iPhones in Pakistan, nor will they ship them to Pakistan.

  • DiscoverSQL2005DBEngineDiscovery.vbs : The Query 'select * from __NAMESPACE where Name ='ComputerManagement'' returned an invalid result set.

    hi
    I am keep receiving this message in central administration running server in event viewer
    DiscoverSQL2005DBEngineDiscovery.vbs : The Query 'select * from __NAMESPACE where Name ='ComputerManagement'' returned an invalid result set.  Please check to see if this is a valid WMI Query.. Object required
    adil

    Hi adil,
    It seems to be not related to SharePoint issue, I find a similar error post from Operations Manager forum you can take a look
    Also another below article of basic troubleshooting of discovery scripts for your reference.
    And for the further better assistance regarding this issue, you may want to post Operations Manager forum here.
    http://social.technet.microsoft.com/Forums/systemcenter/en-US/21e9de85-5cbc-4217-8d9b-921e13dc88dc/sql-mp-issues-with-discovery-vbs-scripts?forum=operationsmanagermgmtpacks
    http://blogs.technet.com/b/kevinholman/archive/2010/03/09/basic-troubleshooting-of-discovery-scripts.aspx
    Thanks
    Daniel Yang
    TechNet Community Support

  • $sql ='SELECT * FROM fideles  WHERE (fideles.NOM ==($_POST [Nom]))';

    hello
    i don'\t know why my syntax is wrong could you help to give me the right syntax.
    thank you for helping
    [email protected]

    i forgot to join my script
    <?php
    mb_http_input("iso-8859-1");
    mb_http_output("iso-8859-1");
    ?>
    <?php require_once('Connections/FIDELES.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;
    mysql_select_db($database_FIDELES, $FIDELES);
    $query_Recordset1 = "SELECT * FROM fideles ORDER BY NOM ASC ";
    $Recordset1 = mysql_query($query_Recordset1, $FIDELES) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    echo $Recordset1;
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
    <head>
           <title>Formulaire</title>
           <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
                 <link rel="stylesheet" media="screen" type="text/css" title="Miseenforme" href="Miseenforme.css" />
                 <style type="text/css">
                 @import url("ModuleStyleSheets.css");
           </style>
                 <link href="CSS/colors5.css" rel="stylesheet" type="text/css" />
                 <style type="text/css">
                 h1 {
              font-size: xx-large;
           #corps form p {
              font-size: 18px;
              text-align: left;
              font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
           #corps form p br {
              font-family: Palatino Linotype, Book Antiqua, Palatino, serif;
              font-size: 24px;
           #corps form p label {
              text-align: left;
           #corps form p label {
              text-align: left;
           #corps form p label {
              text-align: left;
           form p label {
              text-align: left;
           #corps form p {
              color: #FFFFFF;
           </style>
    </head>
       <body>
       <div id="corps">
       <form action="modifier.php" method="POST" enctype="multipart/form-data">
       <p><!-- #BeginDate format:fcAm1 -->Sunday, September 15, 2013<!-- #EndDate -->
       </p>
       <table width="500" border="1" align="center" cellpadding="2" cellspacing="2">
         <tr>
           <th width="500" align="center" bgcolor="#66FFFF" scope="row">FICHE D'INSCRIPTION</th>
         </tr>
       </table>
       <p>
                 <label for="Nom">Nom</label>
                        <input name="Nom" type="text" id="Nom" value="<?php echo ($_POST ['Nom']);   ?>"  size="20" readonly="readonly" /><br/>
                <label for="Prenom">Prenom</label>
                        <input type="text" id="Prenom" name="Prenom" value="<?php echo ($_POST ['Prenom']);  ?>"   size="20" readonly="readonly" /><br/>
         <p>Adresse:
           <label>
             <textarea name="adresse" id="adresse" cols="45" rows="5" value="<?php echo $data['ADRESSE'] ;  ?>" readonly="readonly" /></textarea>
           </label>
            <input name="Submit" type="submit" value="Submit" />
         <input type="reset"/>
           </p>
    </p>
       <?php
        if(isset($_POST['Nom']) &&(isset($_POST['Prenom']) ))
    // lancement de la requete //
    $sql ='SELECT * FROM fideles  WHERE (fideles.NOM =($_POST [Nom]))';
    // on lance la requête (mysql_query) et on impose un message d'erreur si la requête ne se passe pas bien (or die)
    $req = mysql_query($sql) or die('Erreur SQL !<br />'.$sql.'<br />'.mysql_error()); 
    // on recupere le resultat sous forme d'un tableau //
      $data = mysql_fetch_array($req);
    echo $data['ADRESSE'];
      mysql_free_result ($req); 
      mysql_close ();
      return($data); 
      else
       echo "Veuillez saisir le nom et le prenom";
    ?>
              </form>
       <table width="97%" border="1" cellpadding="2" cellspacing="2">
         <tr>
           <td><a href="index.php" rel="publisher">Index</a></td>
           <td><a href="index.php">Accueil</a></td>
           <td><a href="formulaire.php">Creation</a></td>
           <td><a href="formulairemodif.php">Modification</a></td>
           <td><a href="formulairesupress.php">Supression</a></td>
           <td><a href="consultation.php">Consultation</a></td>
           <td><a href="palmdon.php">Palmares des dons</a></td>
         </tr>
       </table>
       <p></div>
    </body>
    </html>
    <?php
    mysql_free_result($Recordset1);
    ?>

Maybe you are looking for