MYSQL & PHP trouble with echoing tables -


So I'm trying to unify the number of rows in a row, but I deliberately do not have any rows in the table now If to test the statement, and it is not working, but worst, then the rest of the sites do not work (page pops up, but no text or numbers appear on it), when I One row added to the table, it worked fine, no row Ø = No work here is the piece of code that does not work Any and all help is highly appreciated.

$ query1 = mysql_query ("SELECT *, COUNT (1) AS 'table 1` with' numberofrows` where WHERE` user` = '$ user name' GROUP BY `first name`, 'Last name' "); $ Numberofrowsbase = 0; While ($ row = mysql_fetch_assoc ($ query1)) {if (isset ($ row ['numberofrows'])) {$ enteries1 = $ enteries1; } And {$ enteries1 = $ numberofrowsbase; } Echo entries 1; }

It seems that everything is complicated by any good advice from the world You should take you onboard, but the simple way to get total rows from the table is:

  Sequence number as SELECT COUNT (*) from Table 1;  

There are many other redundant lines here and the logic is all the bonachers. There is no need to actually do it

  $ enteries1 = $ enteries1;  

It has not achieved anything.

Instead, do this:

  while ($ row = mysql_fetch_assoc ($ query1)) {if (continuing ($ line ['numberwise'])) {$ line ['Numberwise']; }}  

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -