I have a table like this Teacher Table What I am trying to do is to get the row which contains the subjects 1(or any other number like 7,8 etc.) This is what I have tried in my controller. The problem here is that, I am getting all the rows which contains subjects as ‘1’,e.g. if it is ‘3,11,…
Tag: mysql
How to pass the parameters properly for a callback function for preg_replace_callback using a preexisting function?
I am getting this error: Parse error: syntax error, unexpected ” (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING)……… eval()’d code on line 2 Since removing e from the regex expression ~<IF (.?)(?<!-)>(.?)~se a…
Problem with create table Category and get the url correctly PHP
I am creating an ecommerce, which can have Men’s Fashion, Women’s Fashion or Children’s Fashion, it could also have more in the fure like Sports, Electronics, etc. But I don’t know if I have, for example, to repeat the categories clothes, etc for each one or not, I don’t know if …
PHP session update at certain time
I have a php website where I need to unsubscribe a student after one month for example .. for each student I have a “subscribed” value in the mysql database where it can be 0 (unsubscribed) or 1 (subscribed).. I also have a registration date whereby I can know the time after one month for each stu…
Count data in a table column
I Have a database with several rows called tb_reg, with 4 columns: id, comment, date and id_name. . How can i count the number of rows for the diferent id_name in the id_name column ? I would like to have a return in variables, like that: I would like to use the result for each id_name in a graph, showing
RecyclerView Update Single Item’s Child
My Recyclerview list is as in the picture. I want to update the child (example: just the ‘Like’ part) of a single item in my list. I did some research on the subject. I can update the whole item. However, what I need is to update one child of the item. I need code snippet on this. I’m new he…
how to fix this php json response?
I get this result from my PHP: {“risultato”:”1″,”ris”:[{“pda”:”763,41″,”num1″:”86,86″,”num2″:”21,18″,”num3″:”178603,201535″}]} What I need to do if I want to return the result li…
Show non-uniformly time-spaced samples from MySQL database on Google Line Chart by php query
I’m using a Line Chart of Google, I take data from a database of MySQL, to show points of some variables at different datetime. The sample time is 1 minute, but ocationally some points are loss (dont worry about the reason), so when I create de chart, the distance between two point is the same for 1 min…
Is this a secure way of connecting to an SQL server?
Suppose I have a .php script on my server which interacts with a MySQL server. Part of it is: This script is solely server-side, and something like DevTools or view-source://web.address will not show the source code. However, it is really important that nobody is able to see this source code because it bears …
How to get the edit history of a product on an e-commerce website? [closed]
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 months ago. Improve this question I have built an e-commerce website where the admin can edit the prod…