-
Posts
254 -
Joined
-
Last visited
-
Days Won
4
Posts posted by dodgeitorelse3
-
-
I just cut the screen shot short for the Original_name field.
-
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.
-
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.
-
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?
-
3 hours ago, oz11 said:
if($is_anon_set['cooment_anon'] == 1){ echo $anon_comment = "1"; } else { echo $anon_comment = "0"; }
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?
-
onClick="javascript:submitYear($cusid)"/>
this is not inside php tags so $cusid has no value
-
Please do not attach your code as an image. We can't copy the code to run tests with it in our editors.
-
you are also missing a dot in your where user='.$uname
-
4 hours ago, jodunno said:
I have the answer. LOL. I thought about it now for two hours and it dawned on me how to erase the thumbnail data from my code. I'm not telling my solution because you have no desire to accept reality that is not your own.
Seriously?
-
1 hour ago, jodunno said:
client side versus server side should not be a foreign concept to you. So what do you do when i disable JavaScript in my web browser? or what do you do if i use fiddler to fiddle with the request? Imagine if your bank used Javascript to control access to a page. If i could use a shaking my head while holding it in my hands in a downward shamed posiion, then i would use such an emoji here and now.
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.
- 1
-
10 minutes ago, jodunno said:
Please do not implement a script (client side technology) in place of server-side control. I hope that you are really not using such code on a live website. I hope that you understand why this is a bad suggestion. Thanks for trying to be helpful but this is really hurtful advice. I hope that you do not think that i am being rude. I'm just shocked that you would make such a suggestion.
So maybe you can explain why? I am no professional by any means.
-
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.
-
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; } }
-
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?
-
3 hours ago, dodgeitorelse3 said:
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)
line is correct, my bad
-
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)
Query Multiple Tables using 1 common field
in MySQL Help
Posted
@Barand I marked your reply as a solution. There were actually 2 solutions, the first was the SQL tutorials in your signature and the second was your post about
Thank you very much.
This post also turned into a database normalization issue and I am still working on that.