User Profile
Collapse
-
and btw, i tested your ideia, but still, just get the array word in mysql -
this was just 1 example , i just want to understand how to input that string :)
the real code will be something like this :
[php]
<?
$conexao = mysql_connect(" localhost", "root", "12345")
or die ("Erro na conexão ao banco de dados.");
$db = mysql_select_db ("mal")
or die ("Erro ao selecionar a base de dados.");
if(...Leave a comment:
-
Sorry , im a newbye here..and i didnt understand what to do... :(
shall i do this?
...
preg_match($pat tern, $subject, $matches[1]);
$sql = "INSERT INTO tab1 (nome )
VALUES ('$matches') " ;
...
can someone plese give me a concrete "how-to" put this code running?Leave a comment:
-
How to get just the string in mysql ?
hello all , i need help at this:
[php] <?
//connection stuff
$conexao = mysql_connect(" localhost", "root", "12345")
or die ("error to db.");
$db = mysql_select_db ("mal")
or die ("error selecting db.");
// some regex
$subject = $_POST['text'] ;
$pattern = '/def/';
preg_match($pat tern, $subject, $matches);... -
-
how to insert values into mysql, after parsing a submiting textbox?
Hello!!
how do i insert values into mysql , after parsing a submiting textbox??
I made the arrays, so this should be a basic insertion of them in the db, but something is missing, or in the wrong place...can anyone help me??
i didnt made anything in the VALUES (unless the POST [textbox]), because i bet the error is there (yes, the arrays are missing):
$sql = "INSERT INTO dgplanets ( ID, coords , player... -
yes!! thats it!! :D
heres some regex for this part:
30,000 (+600) 50% 20,000 (+400) 50% 1,000 (+60) 50% 0 (+30) 50% 20,000
regex: ([\d,]+) \(\+([\d,]+)\) (\d+)% ([\d,]+) \(\+([\d,]+)\) (\d+)% ([\d,]+) \(\+([\d,]+)\) (\d+)% ([\d,]+) \(\+([\d,]+)\) (\d+)%Leave a comment:
-
Thanks a lot , that part i already understood. :)
Now for a better comprehension of what i want to do , heres the table :
name id pieces (A) (pieces (b) working pieces (A) production (A)
blitzztriger 47 52 40 30000 600
blitzztriger 48 102 40 35000 650
and so on...
From a .txt file like this:
blitzztriger [****] -...Leave a comment:
-
hum, if its difficult, can someone show me just one example?!Leave a comment:
-
how to parse this,and input in mysql ?!
Hello all!
This might be simple,but im having some problems in parsing the php code, can someone help?
i have a text file with this (for example):
--------------------------------------------------------------------
blitzztriger [****] - time : 1
hello - ( 47) 52 40
30,000 (+600) 50% 20,000 (+400) 50%
hello2 - ( 48) 102 40
35,000 (+650) 100% 50,000 (+200) 90%...
No activity results to display
Show More
Leave a comment: