quillspirit
Members-
Posts
33 -
Joined
-
Last visited
Never
Everything posted by quillspirit
-
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, '.', '');
-
Anyone?
-
Problem... it is inserting commas for thousands - 123,456,789.00 breaking my calculations.
-
Excellent - shoulda known it would be that simple. It usually is.
-
I forgot to mention... sometimes $x is already fine at 123.45
-
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.
-
Thanks guys. A session_start(); helps too, lol.
-
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
-
This should be moved to .php help forum
-
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.
-
Ok, got VIM downloaded and installed, and am completely and utterly lost. :0/
-
Ok, I've never used VIM (I use TextPad), but I'll give it a shot.
-
80K products? Can I ask who the supplier is? Just curious.
-
Nevermind, sorry
-
[SOLVED] Posted value is being changed...wierd
quillspirit replied to techtheatre's topic in MySQL Help
Have you tried: CHECK TABLE 'ValuesTemp' -
[SOLVED] Posted value is being changed...wierd
quillspirit replied to techtheatre's topic in MySQL Help
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? -
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.
-
I'm totally lost, bubblegum. Regular Expressions have always looked like greek to me.
-
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.
-
Example please?
-
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!
-
*EDIT* Thanks, that did the trick :)
-
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 :)
-
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?
-
[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.