Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. johno77

    open two files for reading and searching

    Hello I havent used perl for a long time and am trying to refresh my memory to write a quick script - i have got the general jist of whatim doing but am still having a slight problems. I am trying to open up a file of usernames for reading and then trying to find if the username is presnt...
  2. johno77

    sort function

    Hello Has anybody ever built there own sort function before without using the in built sort command. If anyone has would it be possible to get a look at te code for it. many thanks john
  3. johno77

    sort result set

    Howdy folks am new to php but my boss has asked me to have a quick look at something. At the moment i connect to a mysql db do a select statement and print the result set. My boss has asked me though if it is possible to sort on price with minimum first. I would imagine it is i just dont know...
  4. johno77

    Updating a database

    Could someone please inform me if it is possible to code the following statement so if there is no record with name equal to bni the statement inserts the details as a new record. Many thanks UPDATE tab SET eng="50" seq="30" where name="bni"
  5. johno77

    Updating a database

    Hello I have created the following code to update a paticular mysql record. Could any one inform me of how if the record is not present to add it to the database. Thanks - heres the relevant code try { String query1 = "UPDATE system SET cox='"+first+"'...
  6. johno77

    Simple regex

    Hi I am creating a regex so that the variable telephone is a the value read in from a html form. I want to delete any white space which i think i have done and make sure there are eleven digits - while the script works for checking ranges 0-11 if the user enters fourteen numbers the prompt...
  7. johno77

    Threads

    Hello I have created a class below which for the main part sets up a gui. The two bits of the code i am concerned about are below Tcpdump td = new Tcpdump(); try { td.printOutput(text,text1); } catch(IOException e){ System.out.println("tcpdump err");} and the code just below...
  8. johno77

    War file placment

    Hello I have created a webapp which i have created under the context root c:\jspapp - i am using tomcat 4.17. I want to deploy this to other machines under the same structure namely c:\jspapp. Can i create a war file with the entire directory structure underneath jspapp and transfer it to...
  9. johno77

    copying table

    Hello I am not very familiar with mysql but am having to port a table i have created to another machine. I am running the latest mysql. Could someone please inform me how this is possible from the command line. thanks
  10. johno77

    Hi I have a database with severa

    Hi I have a database with several field including a status field named stat. Could somone please let me know how to change the value of this field i.e. update the stat field to the value approved when say the field called username=john and sex=male. thanks
  11. johno77

    Implementing a next button

    Hi hopefully someone may be able to help me out on this one. I have created a servlet which access a DB, stores the results in an arraylist and passes this in the session object to a jsp page. At the moment the code below iterates throught the arraylist and prints out all the records. I would...
  12. johno77

    Simple insert query

    Hello my work doesnt normally bring me into contact with databases so consequently i do not know an awful lot. What i am trying to do is insert values into a table but some of my fields will be entered at a later date - how do i code this i.e. will the following work insert into programming...
  13. johno77

    Simple Security Prob

    Hello i am still a bit new to these technologies so please bear with me. I have a simple jsp page which i have restricted access to in my web-xml file. I am using form based security so when the user tries to access this resource a login page is displayed. If the user has the rights to enter...
  14. johno77

    Hello i am trying to search a field

    Hello i am trying to search a field in a database to see if a certain substring exists i.e. re in fred or oh in johnny. SELECT * FROM whatever where fieldinquestion='???' Could someone point me in the right direction. many thanks john
  15. johno77

    Syntax error in simple statement

    Hi i have no real knowledge of databases but am trying to make a simple table but keep getting a syntax error with the following code: mysql> create table enterprise_programming(Submitter VARCHAR(20) , URL VARCHAR(20) , Date submitted VARCHAR(12) , Version INT , Task-ref-no IN T , Page number...
  16. johno77

    annoying problem - extracting names from hashes

    Hi I have got an awkward problem which i was wondering if anyone coud help me with. I have got a bunch of hashes that i am passing into function to produce html tables. The problem is that i want the html header to math the name of the hash taken as input so if i pass in %example1 then i want...
  17. johno77

    Sorting hashes

    Could anybody tell me if it is posible to sort a hash numerically on the fourth field of an array it contains i.e. $fields[3] $hash{$whatever}=@fields; cheers
  18. johno77

    I need split function help

    i have ammended the sub as follows but my there is still always two fullstops at the end i.e. J.L.R.. sub shorten_initial() { @names = (split /\,/, $_[0]); $init = ""; foreach $name (@names){ $init = $init . substr($name,0,1) . ".";} $init=~s/\.\./\./g; return $init; }...
  19. johno77

    String operations

    Hi again I have created a sub with the details you have given me and it works to a certain extent. The only problems is there is always two full stops at the end of the variable returned i.e. J.P.L.. OR J.. Is there anyway to sort this behaviuor out sub shorten_initial() { @names = (split...
  20. johno77

    String operations

    Thanks for your patience hollywood. Below i have show the value of the variable $forename before being shortened to just initials and the value of the variable $forename after being shortened. John,Leslie --> J.L. John --> J. William,Carter,Smith --> W.C.S. hope...

Part and Inventory Search

Back
Top