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 SkipVought 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. Olavxxx

    Last date and row for a patient

    Hi, check if you have data in all the colums you use for joins Olav Alexander Mjelde
  2. Olavxxx

    Update table to set country (LAND in example) based on e-mail endings.

    Maybe you should consider using a iso3166 table with country codes. eg. 3 char 2 char | 3 char | full NO | NOR | NORWAY Look here: http://www.iso.org/iso/country_codes/iso_3166_code_lists.htm Ps. still you have a problem, I for instance use .com emails, I use .net e-mails and .no :-P You...
  3. Olavxxx

    How to read images into an array using a function ?

    Yes, I would not store the images in the db, but you can store metadata. However, you can also use metadata in the files :-) If you look here: http://www.bilder.raskt.net/picture/original/web_web_ltpgtvolvo_960_twinturbo_engineltpgt/116.intervev There I read the metadata that the camera stored...
  4. Olavxxx

    How to read images into an array using a function ?

    Hi, I think you are on the right track. Use dirlist or database, dont define an array in the script :-) Olav Alexander Mjelde
  5. Olavxxx

    Joining 3 tables

    Hi, maybe the problem is that you are missing data in some of the other tables? You can check this with: SELECT count(*) FROM subscribers WHERE subscribers.uid NOT IN (SELECT uid FROM users_db) AND subscribers.sub_user='1' SELECT count(*) FROM subscribers WHERE subscribers.uid NOT IN (SELECT...
  6. Olavxxx

    Fulltextindex, order by score and weight the records with phone number more.

    Hi, I thought of another idea now.. That might work better (if it works as I think it will). I'll try to add a new colum that I call weight, with standard value of 1. After doing that, all the records will have weight 1 and I can multiply the weight colum to the score (in the query). So if a...
  7. Olavxxx

    Insert Into

    Hi, you should secure that code. Look here: http://php.net/manual/en/function.mysql-real-escape-string.php I would also on top of the example 1 code do some stuff like: strip_tags() trim() ucwords() strtolower() And more :-) On the comment, you can consider if you want to let the user use...
  8. Olavxxx

    strange session error when page refreshed

    btw. I know the issue is fixed, but I can just tell you about one that puzzled me once :-) Redirect from www to http:// caused some cookies not working. I figured out that you can define the superdomain when setting the cookie dough, though ;-) Olav Alexander Mjelde
  9. Olavxxx

    Trying to password protect page and its individual ajax includes.

    Hi, you could chmod (change permissions) for the include-files :-) Olav Alexander Mjelde
  10. Olavxxx

    Fulltextindex, order by score and weight the records with phone number more.

    Hi, I have already made a fulltextindex and it works pretty well with score and distance (calculating distance from the user and the record). However I would further like to improve this search by giving first the records with phone numbers and the ones that are "reserved". I tried adding more...
  11. Olavxxx

    Way to speed up this "lat/lng" mySQL query a bit?

    Btw. I use InnoDB as storage engine, that might also affect performance :-) Olav Alexander Mjelde
  12. Olavxxx

    Way to speed up this "lat/lng" mySQL query a bit?

    Hi, do you have indexes? I also use location-diff for querying a large resultset. Mine is lightning fast and I use 3 tables with an outer join. Sorry I cant share the db design, as I made it for a client. Olav Alexander Mjelde
  13. Olavxxx

    Create a C# function that replicates an oracle function

    Here is a sollution I can use :-) http://www.stum.de/2008/10/20/base36-encoderdecoder-in-c/ Olav Alexander Mjelde
  14. Olavxxx

    fn_varbintohexstr (decimal to hexadecimal) - help get expected output

    Thank you.. I have also found this code: http://www.stum.de/2008/10/20/base36-encoderdecoder-in-c/ which I have tested to work in my C# application :-) Olav Alexander Mjelde
  15. Olavxxx

    RegEx for numbers only, no decimals

    Cant you use the maskedtextbox ? http://msdn.microsoft.com/en-us/library/kkx4h3az.aspx Olav Alexander Mjelde
  16. Olavxxx

    Create a C# function that replicates an oracle function

    Hi, I need to recreate this function (oracle) in C#: FUNCTION dec2hex (N in number) RETURN varchar2 IS hexval varchar2(64); N2 number := N; digit number; hexdigit char; BEGIN while ( N2 > 0 ) loop digit := mod(N2, 36); if digit > 9 then hexdigit :=...
  17. Olavxxx

    fn_varbintohexstr (decimal to hexadecimal) - help get expected output

    Hi again, I found the founction in the oracle database, it looks identical to the one on this page: http://www.orafaq.com/wiki/Hexadecimal Exception: It uses MOD36 instead of MOD16, also the N2 := trunc( N2 / 16 ); uses /36 instead of /16. So it seems to loop the characters one by one, doing...
  18. Olavxxx

    fn_varbintohexstr (decimal to hexadecimal) - help get expected output

    Hi, not sure how oracle does it. I believe it does two conversions and what it returns is chr. I have looked at the ascii conversion tables: Expected(chr) 3 4 4 M X HEX 33 30 34 4D 58 Dec 51 52 52 77 88 Oct 063 064 064 115 130 I need the Expected (chr), from: 5044857...
  19. Olavxxx

    fn_varbintohexstr (decimal to hexadecimal) - help get expected output

    Hi, In oracle, there is a function: dec2hex(). If I feed it with the integer value: 5044857 select dec2hex(5044857) from dual; It returns the value: 304MX In SQL (SQL 2008 I believe it is), there are two ways I have tried doing the same: SELECT 5044857...
  20. Olavxxx

    How can I place data between if else

    @feherke I was thinking about both, not just the things I posted. Saw the general coding-style, so I guess there is a lot of optimization to be done, which also could make it more dynamic. eg. I dont see him echo out any <li> or </li>, </ul>, also this: if($level_depth1 ==0 or $level_depth1...

Part and Inventory Search

Back
Top