-
Posts
253 -
Joined
-
Last visited
-
Days Won
4
Everything posted by dodgeitorelse3
-
Query Multiple Tables using 1 common field
dodgeitorelse3 replied to dodgeitorelse3's topic in MySQL Help
-
Query Multiple Tables using 1 common field
dodgeitorelse3 replied to dodgeitorelse3's topic in MySQL Help
The query has Original_Name. I changed to fetch_assoc and now do not have the duplicate field values. Now I have to work on the normalization. Using design for database I currently have fails when I try to join all the tables. Thank you for that fix Barand. I tried to send sql files in message but I get the error too big. There are 1929 entries and file size of mapnames table is biggest weighing in at 600 kb. second biggest is 223 kb and the last five sql files are 100 kb or less. -
Query Multiple Tables using 1 common field
dodgeitorelse3 replied to dodgeitorelse3's topic in MySQL Help
Still trying to figure out correct design. I understand the resource column is a comma separated string and is a bad design but not sure about any of the rest of the table table/design. I am still trying to figure this out. -
Query Multiple Tables using 1 common field
dodgeitorelse3 replied to dodgeitorelse3's topic in MySQL Help
Yes, normalized is a new term to me. I see I have my work cut out for me. There are 1926 entries in each table I showed lol. Thank you for replying and I will follow up after I "NORMALIZE".. Wish me luck. -
Is it possible to run a query to get data from multiple tables where they have only 1 common field name? Below are images of the field names for each table as well as the web and database server info. If possible which join would I use? I can get 2 tables to return data using SELECT id, size, Original_Name, resource, disabled, tickmark, image, type, creator, modder, beta, final, modded, classification, sf, tod, weather, es2 FROM mapnames INNER JOIN mapnames_tooltips USING (id) ORDER BY id Asc" however this gives me double entries in array. Array ( [0] => Array ( [0] => 1 [id] => 1 [1] => 11441673 [size] => 11441673 [2] => Border.aao [Original_Name] => Border.aao [3] => 2_8_5_default, abr, blannick, chevy, crypt, ffat, kool, rapidfire, vanoke, spectrum [resource] => 2_8_5_default, abr, blannick, chevy, crypt, ffat, kool, rapidfire, vanoke, spectrum [4] => 0 [disabled] => 0 [5] => 1 [tickmark] => 1 [6] => ../../gsreaders/lgsl/lgsl_files/maps/aarmy/armygame/border.jpg [image] => ../../gsreaders/lgsl/lgsl_files/maps/aarmy/armygame/border.jpg [7] => PVP [type] => PVP [8] => Richard Starr [creator] => Richard Starr [9] => [modder] => [10] => N [beta] => N [11] => Y [final] => Y [12] => N [modded] => N [13] => LAND [classification] => LAND [14] => N [sf] => N [15] => DAY [tod] => DAY [16] => HAZY [weather] => HAZY [17] => N [es2] => N [18] => 0 [slots] => 0 ) [1] => Array ( [0] => 2 [id] => 2 This gives me double entries though. Any advice would be greatly appreciated.
-
did you solve the similar error in this post?
-
this doesn't look right does it? to declare the variable you don't echo it.
-
what do you see when you say doesn't work? Does "Not showing anything" mean a blank page?
-
Using PHP and Ajax to show ORDERS by Year without refreshing page
dodgeitorelse3 replied to JunWei's topic in PHP Coding Help
onClick="javascript:submitYear($cusid)"/> this is not inside php tags so $cusid has no value -
you are also missing a dot in your where user='.$uname
-
Seriously?
-
How to prevent direct url with php and mysql
dodgeitorelse3 replied to PNewCode's topic in PHP Coding Help
Thank you for your explanation and delicacy. I now have more knowledge. If i could use a nodding my head, while holding 2 thumbs up in an upward proud position, then i would use such an emoji here and now. -
How to prevent direct url with php and mysql
dodgeitorelse3 replied to PNewCode's topic in PHP Coding Help
So maybe you can explain why? I am no professional by any means. -
How to prevent direct url with php and mysql
dodgeitorelse3 replied to PNewCode's topic in PHP Coding Help
In order to avoid folks opening a page that shouldn't be opened via url I use this. I put it in the header on the page that should not be opened via url. <script type="text/javascript"> if (top.location.href != "http://<?php echo $host_name; ?>/index.php") top.location.href = "../index.php"; </script> perhaps you can modify it to work in conjunction with what you have for your switch. -
Begginer php web app doesnt work
dodgeitorelse3 replied to bogdanserban3105's topic in PHP Coding Help
is your page extension php? -
Does not work mean you don't see a tooltip at all or you do see a tooltip but it isn't showing the value of $EntryDate?
-
What code have you tried so far?
-
with your form inside the for($i=0; $i<=count($hasil); $i++){ you are overwriting all your inputs, input names each time it runs so you will only see last item in $hasil. session_start(); $hasil = array(); echo '<form action="" method="post">'; for($i=0; $i<=count($hasil); $i++){ echo "<input type='text' name='nama[$i]' id='' placeholder='masukkan kegiatan anda'><br>"; } echo '<input type="submit" name="submit" value="masukkan">'; echo '</form>'; if(isset($_POST["submit"])){ $_SESSION['nama'] = $_POST["nama"]; $_SESSION["hasil"]= $_SESSION['nama']; foreach ($_SESSION["hasil"] as $value) { echo $value; } }
-
get all keys that match value from multidimensional array
dodgeitorelse3 replied to dodgeitorelse3's topic in PHP Coding Help
Thank you Barand -
I have an array like this: Array ( [0] => Array ( [id] => 1 [oname] => Border.aao [osize] => 11441673 ) [1] => Array ( [id] => 2 [oname] => Border.aao [osize] => 8194731 ) [2] => Array ( [id] => 3 [oname] => Border.aao [osize] => 8104714 ) [3] => Array ( [id] => 4 [oname] => BRM_Range.aao [osize] => 6848551 ) [4] => Array ( [id] => 5 [oname] => camp_mackall.aao [osize] => 17524696 ) [5] => Array ( [id] => 6 [oname] => Canyon.aao [osize] => 13310448 ) [6] => Array ( [id] => 7 [oname] => District.aao [osize] => 21848613 ) ) I tried to get all keys that match a search value such as Border.aao $mykey = array_search("Border.aao", array_column($duplicate_mapname_array_snames, 'oname')); but this only gives me the first key. I want to get all the keys which should be 0,1 and 2 How do I achieve this?
-
Where is $time defined?
-
this line has 2 id's in it. You can have only 1. echo "<br><div id='".$index."' class='mydiv' style='float: right; background-color: white; background-color:rgba(255,255,255, 0.5); border: 1px solid grey; padding: 6px;' id='tree'>"; and I believe you need quotes around the id in this line as well as a proper name for the id let thediv = document.getElementById(id)