Profile cover photo
Profile photo
Matic Conradi
68 followers -
Random dude. Developer 🖥, minimalist 💎, photographer 🌁. Opinions are my own 🖕.
Random dude. Developer 🖥, minimalist 💎, photographer 🌁. Opinions are my own 🖕.

68 followers
About
Matic's posts

Post has attachment
Hi!
I've done a lot of thinking lately. I've found out that my app isn't really useful for everyone around the globe. School systems are very different in each country. My app on the other hand doesn't adopt to users in other countries. What should I do? Should I drop support for every country in the world except for people in my country? (My country by the way has only 2 million people.) Or should I keep support for all the users but provide a worse user experience?

Thanks for your response!
128 votes
-
votes visible to Public
59%
Only users from my country
38%
All users
4%
Other (please leave a comment)

Hello everyone!
I'm dealing with MySQL data. Here is an example table:

| Subject | Grade |
------------------
| Subjet 1 | 1 |
------------------
| Subjet 1 | 2 |
------------------
| Subjet 1 | 3 |
------------------
| Subjet 2 | 4 |
------------------

I want to echo out the table like this:

-----------------
| Subjet 1 | 1,2,3 |
-----------------
| Subjet 2 | 4 |
-----------------

And here's my query:

SELECT
p.subject as 'subject',
GROUP_CONCAT(grade) as grades
FROM grades p
GROUP BY p.subject

But sometimes data is out of order. For instance instead of 1,2,3 I get something like 3,1,2. If I put ORDER BY at the end it doesn't work. Any suggestions?

Hi!
I'm working on a web app. Right now I'm trying to make it as secure as I possibly can.
I'm using MySQLI instead of MySQL, I've put <pre> tag before every input and I've also put mysqli_real_escape_string($connection, nl2br($_POST['input'])) into PHP instead of just plain $_POST['input']. What should I do next?

I've just found out, that it is possible that PHP can fail to convert string into date. Is there a good reason and a solution?

$time = strtotime($row['date']);

Don't patch the problem. Fix it.

Post has shared content

Post has shared content
Facebook's new chief security officer wants to set a date to kill Flash.

How's tomorrow at 11am? That work for everyone?

http://bit.ly/1L2CHyX

Post has attachment
Two more weeks to Apple's WWDC 2015 and 3 more days to Google I/O 2015. You'll be able to watch Google's conference live on my site http://www.conradi.si/live/ . I would be honoured if you come 😀.

By the way! Which of those two conferences are you going to watch?
481 votes
-
votes visible to Public
Poll option image
Apple WWDC
Both
None
63%
Google I/O
7%
Apple WWDC
17%
Both
12%
None

OK. I successfully accomplished my first step (link to my previous post: https://plus.google.com/+MaticConradi/posts/Mmg2wAyqB3r). Now there are some complications. This is demo table:

ID | userid | Age | Name
1  |    1       | 30   | John
2  |    1       | 31   | Mike
3  |    1       | 30   | Whoever
4  |    2       | 32   | Jack
5  |    2       | 31   | Alice
6  |    3       | 30   | Kurt

Now I would like to display only rows with userid = 1      +      persons with the same age have to be in the sam row:

    userid    | Age | Name
1 (hidden) | 30   | John, Whoever
1 (hidden) | 31   | Mike


In my database I'm using subject and grade instead of age and name. This is how my MySQL query looks right now:

SELECT
p.subject as 'subject'
GROUP_CONCAT(grade) as grades
FROM grades p
GROUP BY p.subject

This displays data for every userid. Userid isn't always 1 so I can't just say if($userid == 1){//code}else{//code} or anything similar... How can I accomplish this?

---

Some PHP code I'm using to display data:

$result = $dbc->query("
SELECT
p.subject as 'subject',
id, finished, date,
GROUP_CONCAT(grade) as names
FROM grades p
GROUP BY p.subject
");
?>
<table>
<tr>
    <th>Subject</th>
    <th>Grade</th>
</tr>
<?php while($row = $result->fetch_assoc()){
    $names = split(",",$row["names"]);
?>
    <tr>
        <td><?php echo $row["subject"] ?> </td>
        <td><?php foreach( $names as $name){echo $name . ' ' ; } ?>
    </tr>
    
<?php } ?>
</table>

Hi! I have a site where I would like to display data from mysql.
I have a table in my database similar to this
Age | Name
30   | John
31   | Mike
30   | Whoever

Now I would like to grab all this data into a table on my site. But... I want to display persons with the same age in the same row. Like this
Age | Name
30   | John, Whoever
31   | Mike

I have tried to do this but I wasn't successful. Do I have to use a special mysql query? Can I do it in PHP?

I hope you can help. THANKS!
Wait while more posts are being loaded