Skip to main content
added 4 characters in body
Source Link
mheinzerling
  • 2.7k
  • 14
  • 17

SQL:

This is just a simple join.

SELECT e.Votes, e.Views, e.id, u.username 
FROM election as e, userinfo as u 
WHERE e.id= u.id WHERE e.ElectionId=? 
ORDER BY e.id ASC

Now you can iterate over all lines and every time e.id is changing you know that you have to display a new group.

Are there really multiple users per Votes and Views pair? I guesguess Votes and Views aare counting columns so youyour model is kind of strange. Maybe you can find better names, so it is easier to get an idea what you want to do.

PHP:

  • usually classes are starting with a capital letter.
  • usually methodmethods are starting with a lower case letter.
  • there is something missing in your output, some echos?
  • it is best practice to skip the ?> at the end, do avoid sending whitespace before in case you will change the page header later.
  • $call and world are really strange names

SQL:

This is just a simple join.

SELECT e.Votes, e.Views, e.id, u.username 
FROM election as e, userinfo as u 
WHERE e.id= u.id WHERE e.ElectionId=? 
ORDER BY e.id ASC

Now you can iterate over all lines and every time e.id is changing you know that you have to display a new group.

Are there really multiple users per Votes and Views pair? I gues Votes and Views a counting columns so you model is kind of strange. Maybe you can find better names, so it is easier to get an idea what you want to do.

PHP:

  • usually classes are starting with a capital letter.
  • usually method are starting with a lower case letter.
  • there is something missing in your output, some echos?
  • it is best practice to skip the ?> at the end, do avoid sending whitespace before in case you will change the page header later.
  • $call and world are really strange names

SQL:

This is just a simple join.

SELECT e.Votes, e.Views, e.id, u.username 
FROM election as e, userinfo as u 
WHERE e.id= u.id WHERE e.ElectionId=? 
ORDER BY e.id ASC

Now you can iterate over all lines and every time e.id is changing you know that you have to display a new group.

Are there really multiple users per Votes and Views pair? I guess Votes and Views are counting columns so your model is kind of strange. Maybe you can find better names, so it is easier to get an idea what you want to do.

PHP:

  • usually classes are starting with a capital letter.
  • usually methods are starting with a lower case letter.
  • there is something missing in your output, some echos?
  • it is best practice to skip the ?> at the end, do avoid sending whitespace in case you will change the page header later.
  • $call and world are really strange names
added 1 characters in body
Source Link
mheinzerling
  • 2.7k
  • 14
  • 17

SQL:

This is just a simple join.

SELECT e.Votes, e.Views, e.id, u.username 
FROM election as e, userinfo as u 
WHERE e.id= u.id WHERE e.ElectionId=? 
ORDER BY e.id ASC

Now you can iterate over all lines and every time e.id is changing you know that you have to display a new group.

Are there really multiple users per Votes and Views pair? I gues Votes and Views a counting columns so you model is kind of strange. Maybe you can find better names, so it is easier to get an idea what you want to do.

PHP:

  • usually classes are starting with a capital letter.
  • usually method are starting with a lower case letter.
  • there is something missing in your output, some echos?
  • it is best practice to skip the ?> at the end, do avoid sending whitespace before in case you will change the page header later.
  • $call and world are really strange names

SQL:

This is just a simple join.

SELECT e.Votes, e.Views, e.id, u.username 
FROM election as e, userinfo as u 
WHERE e.id= u.id WHERE e.ElectionId=? 
ORDER BY e.id ASC

Now you can iterate over all lines and every time e.id is changing you know that you have to display a new group.

PHP:

  • usually classes are starting with a capital letter.
  • usually method are starting with a lower case letter.
  • there is something missing in your output, some echos?
  • it is best practice to skip the ?> at the end, do avoid sending whitespace before in case you will change the page header later.
  • $call and world are really strange names

SQL:

This is just a simple join.

SELECT e.Votes, e.Views, e.id, u.username 
FROM election as e, userinfo as u 
WHERE e.id= u.id WHERE e.ElectionId=? 
ORDER BY e.id ASC

Now you can iterate over all lines and every time e.id is changing you know that you have to display a new group.

Are there really multiple users per Votes and Views pair? I gues Votes and Views a counting columns so you model is kind of strange. Maybe you can find better names, so it is easier to get an idea what you want to do.

PHP:

  • usually classes are starting with a capital letter.
  • usually method are starting with a lower case letter.
  • there is something missing in your output, some echos?
  • it is best practice to skip the ?> at the end, do avoid sending whitespace before in case you will change the page header later.
  • $call and world are really strange names
added 1 characters in body
Source Link
mheinzerling
  • 2.7k
  • 14
  • 17

SQL:

This is just a simple join.

SELECT e.Votes, e.Views, e.id, u.username 
FROM election as e, userinfo as u 
WHERE e.ElectionId =id= u.id WHERE e.ElectionId=? 
ORDER BY e.id ASC

Now you can iterate over all lines and every time e.id is changing you know that you have to display a new group.

PHP:

  • usually classes are starting with a capital letter.
  • usually method are starting with a lower case letter.
  • there is something missing in your output, some echos?
  • it is best practice to skip the ?> at the end, do avoid sending whitespace before in case you will change the page header later.
  • $call and world are really strange names

SQL:

This is just a simple join.

SELECT e.Votes, e.Views, e.id, u.username 
FROM election as e, userinfo as u 
WHERE e.ElectionId = u.id WHERE e.ElectionId=? 
ORDER BY e.id ASC

Now you can iterate over all lines and every time e.id is changing you know that you have to display a new group.

PHP:

  • usually classes are starting with a capital letter.
  • usually method are starting with a lower case letter.
  • there is something missing in your output, some echos?

SQL:

This is just a simple join.

SELECT e.Votes, e.Views, e.id, u.username 
FROM election as e, userinfo as u 
WHERE e.id= u.id WHERE e.ElectionId=? 
ORDER BY e.id ASC

Now you can iterate over all lines and every time e.id is changing you know that you have to display a new group.

PHP:

  • usually classes are starting with a capital letter.
  • usually method are starting with a lower case letter.
  • there is something missing in your output, some echos?
  • it is best practice to skip the ?> at the end, do avoid sending whitespace before in case you will change the page header later.
  • $call and world are really strange names
added 1 characters in body
Source Link
mheinzerling
  • 2.7k
  • 14
  • 17
Loading
Source Link
mheinzerling
  • 2.7k
  • 14
  • 17
Loading