Jump to content

quillspirit

Members
  • Posts

    33
  • Joined

  • Last visited

    Never

Everything posted by quillspirit

  1. Took me a while, but now this is solved: To remove the separator commas from the output, if $x > 999 (so you can continue using $x for calculations): $x=number_format($x, 2, '.', '');
  2. Problem... it is inserting commas for thousands - 123,456,789.00 breaking my calculations.
  3. Excellent - shoulda known it would be that simple. It usually is.
  4. I forgot to mention... sometimes $x is already fine at 123.45
  5. Ok, so I have variable $x = "123.395"; I use $x = round($x, 2); and come up with: All is fine up to this point, except what I need to do is show that as a dollar value (for shopping cart)... so I want to show the missing placeholder 0 for 1/100ths. I don't want a comma for 1,000.00 and do not want a $ sign to display... so I don't think money_format() is what I need. The end result for $x needs to be: Thanks.
  6. Thanks guys. A session_start(); helps too, lol.
  7. Anyone have a snipping of code to echo all data stored in the current $_SESSION ? I'm a little lost in my own scripting, and need to figure out what is all stored. Thanks
  8. This should be moved to .php help forum
  9. Awesome... thank you so much. Now I just need to clean some of the data and sort it for import. It looks like TextPad can run those expressions too, but I'm still lost, lol.
  10. Ok, got VIM downloaded and installed, and am completely and utterly lost. :0/
  11. Ok, I've never used VIM (I use TextPad), but I'll give it a shot.
  12. 80K products? Can I ask who the supplier is? Just curious.
  13. Have you tried passing it to the query as a variable? $test = '12345678901'; INSERT INTO ValuesTemp ( CdId , InvId , CustomerId , CardPart , Month , Year, CreationDate ) VALUES (NULL , '3' , '' , '$test' , '07' , '2007', now() ); Does it show up as that number no matter what value you try to Insert CardPart is?
  14. Ok how about this... is there any way to batch process (To CSV), the individual .txt files, which only contain the one line of description? Once that is done, I can handle it.
  15. I'm totally lost, bubblegum. Regular Expressions have always looked like greek to me.
  16. Yes... example of what you mean by regular expression. Unix with: PHP version 4.4.2 MySQL version 4.0.27-standard btw, I do know how to import CSV from Excel... but I can't figure out how to break this up into rows into Excel.
  17. I have over 30,000 product descriptions that I need to import into my database. These descriptions are currently in individual .txt files (Named for the item_id) such as 10004.txt I managed to merge them all into one single .txt file - here is a sample: Note that all chars are represented in the descriptions: , " / - ; () [] {} | etc. How can I make this .txt file importable into MySQL database? I need to drop it into an empty column, between the rest of the data that is already in there. (MAKING SURE it matches up with the right item_num) item_num item_page_num item_name item_description item_units item_price1 x x x ??? x x Right now, I have my scripting setup to include the needed .txt description to display with the other product info, but that just isn't very good. I want the descriptions to be searchable, and editable in the database.Another bonus would be if I could trim off the item ID numbers before each description, but some of them are alphanumeric or have a space. That is a project for another day. Thanks for any help!
  18. *EDIT* Thanks, that did the trick :)
  19. I know I can round to a whole number with [code]ceil[/code] - but how can I round the just the hundredth? (Second number)... Like 1.33333333333333 to 1.33 ? Thanks for the help :)
  20. EXCELLENT - Awesome, Thank You! That was simple. One last quick question... what permissions should I have on that directory? By default, it is 755 - should I change it?
  21. [quote author=Crayon Violent link=topic=107133.msg429418#msg429418 date=1157566730] you can also put your db.php in a directory below /public_html/ so it is not accessible by anybody but the server. [/quote] I've heard of that, but I'm not sure what the new path would be - I call db.php from my header.php, which is located at domain/dir/header.php - the db.php is currently at domain/dir/inc/db.php - so I am using [code]include('./inc/db.php');[/code] what would be my new path, if I moved it below /public_html/ ? ../../../../db.php ? I always get so confused when it comes to paths... how many dots and such. Thanks for your help.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.