If statement error here is part of the screenshot, so the size of the brackets may not be noticed, but now it is always jumping to else, you cannot execute the above PHPcode $ SQL = & quot; select * from # @__ tgregwhereuserid = '$ ID' & quot; if statement error
This part is truncated, so we may not pay attention to the size brackets, but now we are always jumping to else and cannot execute the preceding
PHP code
$ SQL = "Select * from ##__ tgreg where userid = '$ ID'"; // read the tgreg data table, condition userid = URL id? = *** $ NIC_arcRow = $ dsql-> GetOne ($ SQL); // A condition for setting up a data record, $ tgtime = $ NIC_arcRow ['tgtime']; // output the username value in the tgreg data table $ nowjifena = $ NIC_arcRow ['jifena ']; $ time = time (); if ($ dsql-> ExecuteNoneQuery ($ query) & $ tiem-$ tgtime> 24*3600 & $ nowjifena <11) // check if there is write {// check if there is write in brackets 1 // reserved here you need to write a sentence to get the number set in the background, after jifena is used, you do not need to manually set $ jifena = 1; // manually set the number of points to be added for jifena. // reserved $ jifenb = 100; // set the number of points recommended for jifenb. // $ dsql-> ExecuteNoneQuery ("upd Ate' #@__ member 'set 'scores' = scores + $ jifena where mid = '". $ userid. "'"); // write the SQL statement to the user and add points. // in the preceding example, add 100 points to the user data and update the user table member // die ($ dsql ); $ dsql-> ExecuteNoneQuery ("update' #@__ tgreg 'set 'jifena '= jifena + $ jifena, 'cishu' = cishu + 1, 'tgtime' = $ time where userid = '". $ userid. "'and username = '". $ username. "'"); // SQL execution writes points to the user. // The above sentence updates the promoter's point system jifena class. Note that User Table A and user Table B are distinguished. tgreg // $ dsql-> ExecuteNoneQuery ("updat' # @__ tgreg 'set 'jifenb' = jifenb + $ jifenb where userid = '". $ userid. "'and username = '". $ username. "'"); // write the SQL execution into the user and add points // reserve the above sentence to update the promoter's point system jifenb class. Note that tgreg header ('Location: index.html ') is distinguished between user tables A and B '); // jump after writing} // Check whether there is writing in brackets 2 else {echo wrong ;}
------ Solution --------------------
Since the condition $ dsql-> ExecuteNoneQuery ($ query) & $ tiem-$ tgtime> 24*3600 & $ nowjifena <11 is required
That's right
$ Dsql-> ExecuteNoneQuery ($ query)
$ Tiem-$ tgtime & gt; 24*3600
$ Nowjifena <11
Check
------ Solution --------------------
Dsql-> ExecuteNoneQuery ($ query) & $ tiem-$ tgtime> 24*3600 & $ nowjifena <11
The landlord checks whether all of his conditions are met. You can view the output.