Aravinthan
-
Posts
162 -
Joined
-
Last visited
Never
Posts posted by Aravinthan
-
-
Hi thanks for your help guys.
Yetti, thank you but I get this error:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2097152 bytes) in /home/liguehs/public_html/converter/test_players.php on line 140014
The 2 strings are pretty big... if I put them in a separate file, they have around 1 500 000 Kilobytes....
Is there a work around?
Thanks for your help,
Ara
-
Hi,
I was wondering how to do a script that finds the difference between 2 strings and outputs it.
Exemple:
string1 = "This is a test";
string 2 = "This was a testing";
Ouput should be:
String 1: is
Strng 2: was
String 1:test
String 2: testing
Thanks for your help,
Ara
-
OK I have no idea why...
But it worked well so far, but suddenly it bugs...
Its for the player 1 859...
The 1 858 gets inserted well,
But the 1 859, gets inserted only half way....
INSERT INTO `players` SET `player_id`='537de305e941fccdbba5627e3eefbb24', `shooting`=64, `playmaking`=64, `stickhandling`=55, `checking`=63, `marking`=62, `hitting`=71, `skating`=69, `endurance`=54, `penalty`=64, `faceoffs`=57,
`leadership`=47, `strength`=56, `potentiel`=68, `consistency`=73, `greed`=94, `fighting`=62, `click`=2, `team`=0, `main_position`=1, `country`=1, `handed`=1,
`birth_year`=1983, `birth_day`=25, `birth_month`=4, `salary`=450000, `contract_lenght`=0, `draft_year`=2003, `draft_round`=7, `drafted_by`=24, `rights`=98,
`week_games`=0, `week_goals`=0, `week_assists`=0, `week_points`=0,
`month_games`=0, `month_goals`=0, `month_assists`=0, `month_points`=0,
`record_goals`=28000, `record_assists`=0, `record_points`=892, `no_trade_switch`=0, `two-way_switch`=1, `player-team_option`=0,
`status`=0, `rookie`=0, `considering_offer_data`=0, `team_offering`=0, `amount_time_spent_considering`=0, `injury`=0,
`line8`='0 0 0 0 0 0 0'
WHen there is supposed to be 10 0 in line 8...
I have no idea why it is nor working...
-
Oh wow!!!
I am right... Really getting dumber...
-
I dont quite know where to problem is comming from...
But try replacing
. mysql_real_escape_string($search_each) .
By 2 values.
And run it to see if it works...
-
Can you post the rest, it is too hard to determine the error without the context...
-
Hi guys,
Ok so I have this code:
$line1 = "" .$row['shooting']. " " .$row['playmaking']. " " .$row['stickhandling']. " " .$row['checking']. " " .$row['marking']. " " .$row['hitting']. " " .$row['skating']. " " .$row['endurance']. " " .$row['penalty']. " " .$row['faceoffs']. "/n"; $line2 = "" .$row['leadership']. " " .$row['strength']. " " .$row['potentiel']. " " .$row['consistency']. " " .$row['greed']. " " .$row['fighting']. " " .$row['click']. " " .$row['team']. " " .$row['main_position']. " " .$row['country']. " " .$row['handed']. "/n"; $line3 = "" .$row['birth_year']. " " .$row['birth_day']. " " .$row['birth_month']. " " .$row['salary']. " " .$row['contract_lenght']. " " .$row['draft_year']. " " .$row['draft_round']. " " .$row['drafted_by']. " " .$row['rights']. "/n"; $line4 = "" .$row['week_games']. " " .$row['week_goals']. " " .$row['week_assists']. " " .$row['week_points']. "/n"; $line5 = "" .$row['month_games']. " " .$row['month_goals']. " " .$row['month_assists']. " " .$row['month_points']. "['/n"; $line6 = "" .$row['record_goals']. " " .$row['record_assists']. " " .$row['record_points']. " " .$row['no_trade_switch']. " " .$row['two-way_switch']. " " .$row['player-team_option']. "/n"; $line7 = "" .$row['status']. " " .$row['rookie']. " " .$row['considering_offer_data']. " " .$row['team_offering']. " " .$row['amount_time_spent_considering']. " " .$row['injury']. "/n"; $line8 = "" .$row['line8']. "/n"; $line9 = "" .$row['line9']. "/n"; $line10 = "" .$row['line10']. "/n"; $line11 = "" .$row['goal_streak']. " " .$row['point_streak']. " " .$row['total_gp']. " " .$row['suspended_game']. " " .$row['training']. " " .$row['weight']. " " .$row['height']. " " .$row['status_in_organization']. "/n"; $line12 = "" .$row['best_streak_games']. " " .$row['best_streak_gwg']. " " .$row['best_streak_assists']. " " .$row['best_streak_points']. " " .$row['best_streak_goals']. "/n"; $line13 = "" .$row['line13']. "/n"; $line14 = "" .$row['name']. "/n"; $line15 = "" .$row['line15']. "/n"; $line16 = "" .$row['drafted']. "/n"; $line17 = "" .$row['line17']. "/n"; $line18 = "" .$row['line18']. "/n"; $line19 = "" .$row['line19']. "/n"; $line20 = "" .$row['attitude']. " " .$row['alternate_position']. " " .$row['nhl_rights']. " " .$row['injury_prone']. " " .$row['overral_draft']. ""; $write = "3500 $line1 $line2 $line3 $line4 $line5 $line6 $line7 $line8 $line9 $line10 $line11 $line12 $line13 $line14 $line15 $line15 $line17 $line18 $line19 $line20"; fwrite($file,$write);
But in the file, it puts /n insteald of a line break...
And I cant put my finger on it....
Thanks for your help,
Ara
-
If the $Email is not in between <?php ?>
you must put it..
Like PFM said, its too hard to know why, as we dont know the context
-
AllData.Restaurant, AllData.Producer, AllData.Cookery_School, AllData.Caterer, AllData.Consultant, AllData.Accomodation, AllData.Patron, AllData.Freelance, AllData.Lecturer, AllData.Name, AllData.Address1, AllData.Address2, AllData.Address3, AllData.County, AllData.Tel, AllData.Fax, AllData.Email, AllData.Website, AllData.Proprietor, AllData.Chef, AllData.Member1, AllData.Location, AllData.Description, AllData.Additional_Info, AllData.Wheelchair_Access, AllData.OH_Lunch, AllData.OH_Dinner, AllData.Closed,
Remove the last comma
But why dont you jsut replace the whole thing by *
It will be way simpler.
-
I am going to give you a simple User Management System
1) Create a table with: userid, username, email, address ( You need teh first 2, the rest you can add/remove to your likings)
2) Create a Registration form and just insert the info into DB
3) Make a loggin script (Check the username and password provided from the form to see if the user actually exists)
If a user exists, fetch the userid from the Database and put it in the link.
Something to get you started:
Use if mysql_rows.
And the link would be:
www.yoursite.com/profile.php?id=userid
4) Make a profile page, DONT PUT ANY DB stuffs yet.
Just design it to your needs. Where you want to put the user's details put a default value. For exemple where you want to display his username, put username.
And when your all done, Put this at the top:
<?php $userid = $_GET['id']; ?>
This will get the user id.
And make a while loop to fetch the rest of the information, where userid = userid.
I hope I was clear...
If you need more help,
dont hestitate
-
I dont see your problem... It works fine for me....
-
Good,
I have a question for previous code,
Can you echo out $uid ?
If it is empty, there is your problem.
-
I will go simple to start.
$username = $_POST['username']; // Get Username via a form $sql1 = "SELECT * FROM `users` WHERE `username`='$username' "; $res1 = mysql_query($sql1) or die(mysql_error()); if(mysql_num_rows($res1) == 0){ return PROFILE_ERR_INVALID_USER; } else { $row1 = mysql_fetch_assoc($res1); if (!$link) { return $row1['username']; } else { return $row1['username']; } }
Try this.
If it works we can go a bit more more deeper
-
W3cSchools PHP
PHP.net
-
I think you can have the same values, not sure thou.
Just run it to see if it works.
-
Show us your table to see how you builded it...
-
-
It is not me who has the problem.
Lol,
So Dany is everything ok?
-
Post the form code.
-
Run this:
SELECT * FROM media_cat WHERE name LIKE '0%' ORDER BY name ASC
And tell me if gives a result
-
Are you sure?
I tried it and it works fine for me...
What is the error you get?
-
Try this:
$lenght = strlen("hey,hey,hey,hey,"); $start = $length - 1; echo substr("hey,hey,hey,hey,",$start,1);
Or try what thebadbad gave you...
God I am thinking the hard way today.... -.-
-
Do you have PHP My Admin with your host?
It would be easier for your to maintain it.
Check in your control Panel
-
@sdhi,
I experienced some problems... And I put the quotes and it starts working...
But yeah the semi-colon is the problem...
I was looking in the wrong place lol.
Differences between 2 strings
in PHP Coding Help
Posted
OK I uploaded a file( the whole file is a string )
It was too big to be uploaded on the forums.
Link:
http://www.megafileupload.com/en/file/134577/players-txt.html