mysql - php count table column -


I am trying to write a script / html page that displays the live company information internally, Which is to count the amount of live project from our database.

The widget will need to look at the table called 'Project', then look at the 'Live' column and count how many times 'Live' is displayed, but my last problem is that we Companies operate, so first it has to be checked that 'E' is in the 'Company' of that column and then calculate the 'Live' column.

I should not understand why my PHP skills are less than a novice ... like n00b!

Try a simple count () similar to mysql query:

  SELECT SELECT SELECT * (*) as calculate with `Projects 'where back to value in the' live` = 'LIVE'`  php  file and In order to output it as a `code` html, you have to give output as  html . To get the result of the query: 

  $ result = mysql_query ("select count '(*) as calculated from projects' live '=' live 'and company =' e ''); $ Line = mysql_fetch_array ($ result); Echo ['count'] per line;  

Caution

You should not use any of mysql _ * , they disliked your application In fact, for the attacks, they feel free to use them as learning tools (many tutorials), but once you feel comfortable connecting to the database, then mysqli or pdo . Good reads:


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -