Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by techker

  1. ya i think thats what il do ..lol thx
  2. the database entry is json format ["http:\/\/server:8080\/9Lx0YfoxZp\/DexfrUxcn\/2107"] and has other fields like name...... cause the panel fetched the info and encodes it in json for output to selected file needed... but i just noticed that it has all entries so database table can contain 15000 streams... so i would need to check and remove duplicates.... or like you say i can use the existing api and read the json but it can take long time if to many results....
  3. hey guys i have a table streams that has multiple columns but i need one and brake the string? stream_source contains ["http:\/\/server:8080\/9Lx0YfoxZp\/DexfrUxcn\/2107"] so i need just : http:\/\/server:8080 as dns 9Lx0YfoxZp as username and DexfrUxcn as password i have tried a few was like this example.. but no luck im guessing its because i first need to remove [" ? SELECT SUBSTRING_INDEX(stream_source, ' \/ ', 1) AS dns, SUBSTRING_INDEX(SUBSTRING_INDEX(stream_source,' \/ ', 2), ' ',-1) AS mname, SUBSTRING_INDEX(stream_source, ' \/ ', -1) as lname FROM streams;
  4. Hey guys i need to echo this: Up to know i tried lots of combos but can seem to get the Array correctly? it echos : but the [ needs to be at results.... Thx for the help
  5. That works great..love your php style...not there yet...lol
  6. would you know why it dow's one more than en what i ask?is it the select i did?that would calculate 0 as 1? great example il try it out.again thx for the help!
  7. even with a different approach same thing if i put 1 it updates 2 for ($h = 1; $h <= $CreditCount; $h++) echo "<option value='$h'>$h</option>"; echo "</select>";
  8. Uhh stupid me lol So first issue was that i forgot to add AND Status != 'Used' . so it would update a used code..that is why i would not see it .. But the issue i have now is that if i select 1 credit it puts 2 is it because it is like an array that 0 is 1 so it would do 0 then 1 so gives 2? have a feeling it is this: its were i add the user.it gets the amount of credits the user has(code) and puts them in a select for his to select the amount to transfer so he knows how many he can transfer.. $range = range(1,$CreditCount); foreach ($range as $cm) { echo "<option value='$cm'>$cm</option>"; } echo "</select>"; ?>
  9. same issue very odd...it does not update at all... require_once 'config/dbconnect.php'; $userid = strip_tags($_GET['user']); $subid = strip_tags($_GET['newUser']); $cr = strip_tags($_GET['cr']); $userida = $DBcon->real_escape_string($userid); $subida = $DBcon->real_escape_string($subid); $cra = $DBcon->real_escape_string($cr); $stmt = $DBcon->prepare("UPDATE Codes SET UserID = ? WHERE UserID = ? LIMIT ?"); $stmt->bind_param('iii', $subida, $userida, $cra); $stmt->execute(); if(!$stmt->execute()) { echo "Error: " . mysqli_error($DBcon); }else{ echo "Success adding user : $subida with : $cra "; echo "<meta http-equiv=Refresh content=1;url=Subseller.php?success=1 >"; }
  10. Credits stay the same even do the echo says 2 credits from to ...
  11. thats odd i logout login works but after that does not work anymore..even if i logout again...unless its a cash issue..
  12. ok odd it seems to be working now!lol.must of been my session was expirerd?let me test to see Thx!!
  13. im echoing the correct POST credits: 2 Updated! new owner: 36 from owner: 18
  14. ya its odd..why is it not working for me.... ini_set("display_errors", 1); header("Refresh: 30"); require_once 'config/dbconnect.php'; $userid = $_POST['OwnerID']; $subid = $_POST['SubID']; $cr = $_POST['credits']; $stmt = $DBcon->prepare("UPDATE Codes SET UserID = ? WHERE UserID = ? LIMIT ?"); $stmt->bind_param('iii', $subid, $userid, $cr); $stmt->execute(); echo "$userid<br /><br /><em>$cr Updated! $subid</em><br /><br />"; echo "<meta http-equiv=Refresh content=1;url=SwapC.php?success=1 >"; ?>
  15. not sure how to export it..lol so basically: CID Value DateIn Status . UserID . DateSold 1 . 24242 2019-11-11 . 0 5 null 2. 24243 2019-11-11 . 0 5 null 3 . 24244 2019-11-11 . 0 5 null 4 . 24245 2019-11-11 . 0 3 null 5 . 24246 2019-11-11 . 0 3 null 6. 24246 2019-11-11 . 0 4 null 7 . 24246 2019-11-11 . 0 4 null user is 5 . want to give 2 codes(value) to user 3 any value(code) should be : CID Value DateIn Status . UserID . DateSold 1 . 24242 2019-11-11 . 0 5 null 2. 24243 2019-11-11 . 0 3 null 3 . 24244 2019-11-11 . 0 3 null 4 . 24245 2019-11-11 . 0 3 null 5 . 24246 2019-11-11 . 0 3 null 6. 24246 2019-11-11 . 0 4 null 7 . 24246 2019-11-11 . 0 4 null
  16. what do you need?? CREATE TABLE `Codes` ( `CID` int(11) NOT NULL, `Value` varchar(100) NOT NULL, `DateIn` varchar(25) NOT NULL, `Status` varchar(25) NOT NULL, `UserID` varchar(25) NOT NULL, `DateSold` varchar(25) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  17. no lol CID Value DateIn Status UserID DateSold i tried: but stays at same.. $userid = mysqli_real_escape_string($DBcon, $_POST['OwnerID']); $subid = mysqli_real_escape_string($DBcon, $_POST['SubID']); $cr = mysqli_real_escape_string($DBcon, $_POST['credits']); $stmt = $DBcon->prepare("UPDATE Codes SET UserID = ? WHERE UserID = ? LIMIT ? "); $stmt->bind_param('iii', $subid, $userid, $cr); $stmt->execute();
  18. also tried $size = count($_POST['credits']); $i = 0; while ($i < $size) { $UserIDa= $_POST['OwnerID'][$i]; $NewRIda = $_POST['SubID'][$i]; $query = "UPDATE Codes SET UserID= '$UserIDa' WHERE UserID = '$NewRIda'"; mysqli_query($DBcon,$query) or die ("Error in query: $query"); echo "$UserIDa<br /><br /><em>Updated!</em><br /><br />"; ++$i; } table code is set id value userid status dateSold
  19. hey ya thx $Cr = mysqli_real_escape_string($DBcon, $_POST['credits']); is the number of credits the guy wants to give the other guy. so lets say he has 20 codes and wants to give 10 to the other guy in my codes table i have column codes and and column userID were i put the guys id (owner) so now my issue is to take 10 codes out of 20 and swap his id to the new guys id
  20. Hey guys..i have an issue i can't seem to fix... i have a table with codes and userid to associate the code to a user i need to make it that a user can give codes to another user. i have a form . from user to other user with amount of codes so i have tried many combos.. $UserID = mysqli_real_escape_string($DBcon, $_POST['OwnerID']); $NewRId = mysqli_real_escape_string($DBcon, $_POST['SubID']); $Cr = mysqli_real_escape_string($DBcon, $_POST['credits']); tried with range $t = array(); $counter = 0; foreach (range(0, $Cr) as $t) { $sql = "UPDATE `Codes` SET `UserID`= '$NewRId' WHERE `UserID` = '$UserID'"; $counter ++; echo $counter; } $result = mysqli_query($DBcon,$sql); if (!$result) { trigger_error("UPDATE query failed: " . mysqli_error(), E_USER_ERROR); } but it takes all the ocdes from user one to user two... tried also: foreach ($Cr as $t) { $sql2 = "UPDATE `Codes` SET `UserID`= '$NewRId' WHERE `UserID` = '$UserID'"; if ($DBcon->query($sql2) === TRUE) { echo "<meta http-equiv=Refresh content=1;url=SwapC.php?success=1 >"; } else { echo "Error updating record: <br>" . $DBcon->error; } } but does not work...
  21. ok let me restart..sometimes i tend to right what i think in my own words..lol ok i extracted usernames and emails from databases. now we installed a new script and we want to import the username and emails in that main database. so this script it needs the main user table to have username and email a the date. once that is done user_profile user_count user_Activity needs to have the id generated from user table inserted.
  22. the database is new.so all the emails will be unique. i have about 1200 emails..lol so first step is insert into the user database the select user id from the database and insert into the profile and others.. but i need to add them individually..not all in one table.
  23. Hey guy's my body has a few social media site and want's to merge them all in one. i extracted all the username and emails from all DB i need to insert the username and email in the new database and once that is done take the userID an isert it in 4 other databases so the first step is user then the others are for profiles and settings..if i don't do it the user lands on a 404 since the profile was not created.. is there a way to do this automated.. i inserted the usernames in Database Dump on the same server
  24. ya i think i need to site down with my body on this..lol the drag and drop is a good idea..just need to make a database that will store the order that he sets it with an id. then extract by order by.. Hey thx for the help guys!
  • 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.