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 Chriss Miller 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: *

  • Users: teroy
  • Content: Threads
  • Order by date
  1. teroy

    query help - sum & group

    Hi guys, I have records that look like the following custname | custgroup | queryname | subnet | day | hour | dbytes | ubytes ----------+---------------+-------------+--------------+-----+------+----------+-------- cee | SOHO DSL User | chargeddata | 202.137.73.2 |...
  2. teroy

    no statement executing

    hi guys, I got the following error in my log files when i run a sql statement that does not return a value for fields ina recordset [Thu May 8 16:30:50 2003] missing_fields.cgi: no statement executing at /home/troyr/public_html/2002/platypus_contacts/tools/missing_fields.cgi line 56...
  3. teroy

    adding values from diff records

    hi guys.. i have a select statement which goes like this SELECT l.id,o.frequency,o.frequency as freq1, l.name, l.url, l.description FROM links l, object_word_link o, word w WHERE l.id=o.object_id AND w.id=o.word_id AND ( lower(l.name || l.keywords) like '%melbourne%' AND lower(l.name ||...
  4. teroy

    query help

    Hi Guys, i have the following sql statement SELECT c.id, c.name, c.username, c.email FROM customer c, rgheader r, custrate cu WHERE 0 = 0 AND NOT tech_record = 1 AND cu.custid = c.id AND cu.rgid = r.id AND r.id = 200 Now this works okay....but if i want to modify the last line like...
  5. teroy

    perl and sql server - per page

    hi guys, i was wondering how you guys deal with giving the user a per page option with a cgi script using perl and sql server. When i use perl and postgres i use select field from table limit $num offset $num as far as i can tell..i can't find something similiar for sql server...ie...
  6. teroy

    date manipulations

    Hi there.. I have a variable which contains a date..say my $var="1940/12/12/"; Is there any module around that gets the difference between this date and the current time. So basically something which returns ($year,$month,$days) So it can be presented like You are 50 years, 3...
  7. teroy

    regular expression

    Hi Guys, I have the following string my $test="www.vicnet.net.au check out this link www.vicnet.net.au it could be http://www.vicnet.net.au"; and a regex which follows: $test=~s/[^\/]www*\b/ http:\/\/www$1/gi; what i want to happen..is if it finds www i want it to add...
  8. teroy

    limit & offset

    Hi there, I was wondering if sql server has a command to only get an offset of records specified. ie so if you only wanted to return 10 records you could do so..but you can start from the 20th record returned..instead of the 1st in other sql apps (ie postgresql) you can do select * from...
  9. teroy

    timestamp

    Hi There, Is there a way i can declare the timestamp field without it adding the 'with timezone' section ? thanks in advance. troy
  10. teroy

    date- updating records

    hi there.. if i wanted to automatically add the date for when a record was inserted i would use the following in my schema my_date date default now() does anyone know what the equivalent is if i wanted to have a field which gave the current date every time a record is updated? Thanks in...
  11. teroy

    concatenate strings

    Hi there, if i have a query which is the following: select '<option value=' || id || '>' || name as hehe from library; which produces the result hehe ------------------------------------------------------ <option value=1>Bayside City Council Library Service...
  12. teroy

    insert statements

    Hey there if i have the following insert into users (username) values ('troy') ; and then straight after that i want to do insert into customer (name,user_id) values ('troy','$id') ; how do you get the id of the first insert statement (assuming we have a serial primary key) without doing a...
  13. teroy

    converting characters in email

    Hi there, I have a form in html which passes the value of a textarea to a perl script which emails out the value. All works fine. However...users of the script copy and paste text from Microsoft Word which has smart quotes in it. It displays fine on the web..but when the user...
  14. teroy

    simple reg expression

    Hi there, I was wondering if anyone knew the syntax to write code for the following. I want to have an alert box that pops up if the value in a input type contains a non alpha numeric character ie &quot;%$#&quot; so i would do the following function checkform() { if (&quot;don't...
  15. teroy

    limit command

    Hi there, If i do a sql query that returned 25 rows say select * from customer how do i get rows 10 to 20? I use another dbase called postgreSQL and the way it does it is select * from customer limit 10,10 wheras the first 10 is how many rows you want returned and the 2nd 10 is where...
  16. teroy

    cookie expiry problems

    Hi there, I have troubles resetting cookie expiry time in IE and some versions of Netscape on Linux. The code i use is as follows $the_cookie = cookie(-name=>'sid', -value=>$session_id, -expires=>'+2m'...
  17. teroy

    recursive functions

    hi there. I would like to call a function within a function but am having troubles here is my function The place where its giving an error is select return_shit(temp); which is where i'm trying to call the function. Thanks in advance create function return_shit (int4) returns int4 as '...
  18. teroy

    function editing

    Hi there, when i create a function in psql how can i edit it once its made? i can drop it via \drop function but i can't seem to find out how to edit it Thanks in advance
  19. teroy

    confirm box

    Hi there. When i want to use a confirm button using a form i do as follows ----------------------------------------------------------- function checkform2() { // Uses a confirm box var yes = self.confirm(&quot;Are you sure?&quot;); return yes; } <FORM name=&quot;&quot...
  20. teroy

    file uploading

    Hi I'm using the following to upload a file to a server. But anything over a 1 meg does not go thru. Does anyone know why? I have increased the buffer size to more than 1024. Thanks in advance Html bit <snip> <form action=mytest.cgi method=post ENCTYPE=&quot;multipart/form-data&quot;> <input...

Part and Inventory Search

Back
Top