<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>MySQL Forums - PHP</title>
        <description>Forum for MySQL and PHP.</description>
        <link>https://forums.mysql.com/list.php?52</link>
        <lastBuildDate>Sun, 15 Mar 2026 20:41:53 +0000</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://forums.mysql.com/read.php?52,741646,741646#msg-741646</guid>
            <title>AWS Ubuntu / MariaDB / MySQL can&#039;t view tables but data looks like it&#039;s there (no replies)</title>
            <link>https://forums.mysql.com/read.php?52,741646,741646#msg-741646</link>
            <description><![CDATA[ Recently my phpBB forums stopped working with DB errors, I tried to go and view the tables and nothing returns.  I went to the /lib/ mysql directory and the DB directory is there and full of the files many very large, but I cannot access them.<br />
<br />
I also get authentication errors now.  I have root/ownership of the domain.<br />
<br />
Ubuntu is the latest LTS release.<br />
<br />
Can someone help?]]></description>
            <dc:creator>Christopher Feeny</dc:creator>
            <category>PHP</category>
            <pubDate>Tue, 24 Feb 2026 21:58:32 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,741379,741379#msg-741379</guid>
            <title>Failed connection or timeout to remote MySQL server takes web sites offline (no replies)</title>
            <link>https://forums.mysql.com/read.php?52,741379,741379#msg-741379</link>
            <description><![CDATA[ I have a Linux web server that contains a number of websites in PHP.<br />
<br />
A few of the sites do queries to a remove MySQL server, some of the sites use local MySQL, and most don&#039;t use any MySQL at all.<br />
<br />
Whenever the remote MySQL server can&#039;t be reached, it quickly stops all the sites on the server from responding.<br />
<br />
Is there any config to stop the other sites from being dragged down by the sites trying to do the remote queries?<br />
<br />
I&#039;m assuming this is all because there is a query queue somewhere on the local server that fills up and something dies.<br />
<br />
When the remote MySQL server comes back online, everything catches up in a few minutes and all the sites come back online too.<br />
<br />
Thanks]]></description>
            <dc:creator>Paul Field</dc:creator>
            <category>PHP</category>
            <pubDate>Wed, 12 Nov 2025 21:02:01 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,729946,729946#msg-729946</guid>
            <title>PHP version change (no replies)</title>
            <link>https://forums.mysql.com/read.php?52,729946,729946#msg-729946</link>
            <description><![CDATA[ PHP version changes introduce new features, improvements, and security enhancements, while deprecating outdated functions. Upgrading ensures better performance and compatibility with modern frameworks, but may require code adjustments for deprecated elements to maintain functionality.]]></description>
            <dc:creator>Familiar IT</dc:creator>
            <category>PHP</category>
            <pubDate>Mon, 28 Oct 2024 00:42:21 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,725663,725663#msg-725663</guid>
            <title>Php database connect error (no replies)</title>
            <link>https://forums.mysql.com/read.php?52,725663,725663#msg-725663</link>
            <description><![CDATA[ Hello everyone:<br />
                I am getting following error on MySQL 5.4 Windows server 2012;<br />
<br />
A PHP Error was encountered<br />
Severity: Warning<br />
<br />
Message: mysqli::real_connect(): (HY000/2002): Connection refused<br />
<br />
Filename: mysqli/mysqli_driver.php<br />
<br />
Line Number: 202<br />
<br />
Backtrace:<br />
<br />
File: /var/www/vhosts/sys.lhc.gov.pk/htdoc/application/controllers/Case_management.php<br />
Line: 37<br />
Function: __construct<br />
<br />
File: /var/www/vhosts/sys.lhc.gov.pk/htdoc/index.php<br />
Line: 315<br />
Function: require_once<br />
<br />
A Database Error Occurred<br />
Unable to connect to your database server using the provided settings.<br />
<br />
Filename: controllers/Case_management.php<br />
<br />
Line Number: 37<br />
<br />
An expert response is highly appreciated]]></description>
            <dc:creator>IFTIKHAR AHMAD</dc:creator>
            <category>PHP</category>
            <pubDate>Mon, 26 Aug 2024 15:38:29 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,725368,725368#msg-725368</guid>
            <title>SQL Search Help (no replies)</title>
            <link>https://forums.mysql.com/read.php?52,725368,725368#msg-725368</link>
            <description><![CDATA[ I have a table of players and a table called gamePlayers. In this table I have a row for each game (which has gameID) key, and playerID for each player in each game.<br />
<br />
I have a player in question, their unique field is playerID<br />
<br />
What I want to do is show the a count of other players who&#039;ve played in the same same game as the player in question.<br />
<br />
For example, player 20 in question, player 30 is in 10 games the same as player 20.<br />
<br />
how can I do this?]]></description>
            <dc:creator>B R</dc:creator>
            <category>PHP</category>
            <pubDate>Sun, 04 Aug 2024 06:31:20 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,724881,724881#msg-724881</guid>
            <title>SQL Query (1 reply)</title>
            <link>https://forums.mysql.com/read.php?52,724881,724881#msg-724881</link>
            <description><![CDATA[ Hi everyone, sorry but I translate from Italian with Google. I hope my question is clear.<br />
We have provided a database in SQL. at the moment the sistem owner told me that it is not possible to extract data. I believe instead that since there is a &quot;relationship&quot; it can be done. example:<br />
(12345678) A (bin name)<br />
(REF 12345678) B<br />
(REF 12345678) C<br />
(REF 12345678) D<br />
(REF 12345678) E<br />
 documents contained in the binder.<br />
can you extract A and below all the REFs with that number? Thanks for the reply]]></description>
            <dc:creator>Mammaluk Luk</dc:creator>
            <category>PHP</category>
            <pubDate>Thu, 12 Dec 2024 13:23:00 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,724811,724811#msg-724811</guid>
            <title>Convert database string (2 replies)</title>
            <link>https://forums.mysql.com/read.php?52,724811,724811#msg-724811</link>
            <description><![CDATA[ Hello<br />
I&#039;m trying to read some data from my database. So far it&#039;s worked without any problems. Now I want a read array, which looks like this...<br />
<br />
Array ( [0] =&gt; 25.88 [1] =&gt; 25.88 [2] =&gt; 25.88 [3] =&gt; 26.00 [4] =&gt; 25.81 [5] =&gt; 25.88 [6] =&gt; 25.75 [7] =&gt; 25.94 [8] =&gt; 25.69 [9] =&gt; 25.69 [10] =&gt; 25.62 [11] =&gt; 25.62 [12] =&gt; 25.75 )<br />
<br />
into a readable format for my Javascript.<br />
<br />
The format must look like this...<br />
<br />
25.88, 25.88, 25.88, 26.00, 25.81, 25.88, 25.75, 25.94, 25.69, 25.69, 25.62, 25.62, 25.75<br />
<br />
My script sees this...<br />
<br />
-------------------------------------------<br />
<br />
&lt;?php<br />
<br />
//Database access data <br />
  $hostname = &quot;localhost:3306&quot;;          // eg,localhost - should not be empty for productive servers<br />
  $password = &quot;xxxxxxxx&quot;;                // The password of the database<br />
  $username = &quot;web705&quot;;                  // The username of the database<br />
  $usertable = &quot;wp&quot;;              // Database table name that gets created by setup<br />
  $database = &quot;web705&quot;;                  // Database where Online search records are held<br />
<br />
<br />
// Connection to DB<br />
$db_conn = mysqli_connect ($hostname, $username, $password, $database);<br />
<br />
// Variable for DB array<br />
	$i = 0;<br />
<br />
// Read the DB<br />
$sql = &quot;SELECT * FROM wp ORDER BY DT DESC LIMIT 13&quot;;<br />
<br />
//Checks connection and reads data from DB<br />
$db_query = mysqli_query( $db_conn, $sql );<br />
if ( ! $db_query )<br />
{<br />
  die(&#039;Invalid query: &#039; . mysqli_error());<br />
}<br />
<br />
while ($row = mysqli_fetch_array( $db_query, MYSQLI_ASSOC))<br />
{<br />
    echo $row[&#039;t1&#039;];<br />
    echo &quot;, &quot;;<br />
  <br />
  			$string1[$i] = $row[&quot;t1&quot;];<br />
			$string2[$i] = $row[&quot;t2&quot;];<br />
  	$i++;<br />
}<br />
<br />
mysqli_free_result( $db_query );<br />
<br />
<br />
echo &quot;&lt;br&gt;&lt;br&gt;&quot;; <br />
print_r($string1);<br />
<br />
?&gt;<br />
<br />
------------------------------------------------------------<br />
<br />
CREATE TABLE `wp` (<br />
  `ID` int(11) UNSIGNED NOT NULL,<br />
  `DT` timestamp NOT NULL DEFAULT current_timestamp(),<br />
  `DATE` date NOT NULL DEFAULT current_timestamp(),<br />
  `TIME` time NOT NULL DEFAULT current_timestamp(),<br />
  `t1` decimal(6,2) DEFAULT 0.00,<br />
  `t2` decimal(6,2) DEFAULT 0.00,<br />
  `t3` decimal(6,2) DEFAULT 0.00,<br />
  `t4` decimal(6,2) DEFAULT 0.00,<br />
  `t5` decimal(6,2) DEFAULT 0.00,<br />
  `t6` decimal(6,2) DEFAULT 0.00<br />
) ENGINE=InnoDB DEFAULT CHARSET=utf8;<br />
<br />
--<br />
-- Data for table `wp`<br />
--<br />
<br />
INSERT INTO `wp` (`ID`, `DT`, `DATE`, `TIME`, `t1`, `t2`, `t3`, `t4`, `t5`, `t6`) VALUES<br />
(1, &#039;2024-06-03 10:55:01&#039;, &#039;2024-06-03&#039;, &#039;12:55:01&#039;, 25.00, 24.75, 0.00, 0.00, 0.00, 0.00),<br />
(2, &#039;2024-06-03 11:00:00&#039;, &#039;2024-06-03&#039;, &#039;13:00:00&#039;, 25.12, 24.88, 0.00, 0.00, 0.00, 0.00),<br />
(3, &#039;2024-06-03 11:05:01&#039;, &#039;2024-06-03&#039;, &#039;13:05:01&#039;, 25.06, 24.81, 0.00, 0.00, 0.00, 0.00),<br />
(4, &#039;2024-06-03 11:10:01&#039;, &#039;2024-06-03&#039;, &#039;13:10:01&#039;, 25.19, 25.00, 0.00, 0.00, 0.00, 0.00),<br />
(5, &#039;2024-06-03 11:15:01&#039;, &#039;2024-06-03&#039;, &#039;13:15:01&#039;, 25.31, 25.06, 0.00, 0.00, 0.00, 0.00)<br />
<br />
-----------------------------------------------------------------<br />
<br />
The PHP version is 8.0.23 !<br />
<br />
I have to insert the string like this in Java...<br />
<br />
&lt;?php $string1; ?&gt;<br />
<br />
<br />
Can someone please change the script so that it works?<br />
<br />
best regards...]]></description>
            <dc:creator>Gerd Modla</dc:creator>
            <category>PHP</category>
            <pubDate>Tue, 06 Aug 2024 13:43:47 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,723991,723991#msg-723991</guid>
            <title>MYSQL mysqli_num_rows vs Select count() (no replies)</title>
            <link>https://forums.mysql.com/read.php?52,723991,723991#msg-723991</link>
            <description><![CDATA[ I am currently working on optimizing our database queries and came across two options that perform the same task get row count. but might have varying levels of efficiency. I was hoping you could shed some light on which one would be faster and more effective in terms of performance.<br />
<br />
Option 1:<br />
$query = &quot;SELECT * FROM tb&quot;;<br />
$q = mysqli_query($conn, $query);<br />
$row = mysqli_num_rows($q);<br />
<br />
Option 2:<br />
$query = &quot;SELECT count(id) as num FROM tb&quot;;<br />
$q = mysqli_query($conn, $query);<br />
$row = mysqli_fetch_assoc($q);]]></description>
            <dc:creator>Rasly Sameen</dc:creator>
            <category>PHP</category>
            <pubDate>Thu, 02 May 2024 10:49:22 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,723140,723140#msg-723140</guid>
            <title>SQL hacking (no replies)</title>
            <link>https://forums.mysql.com/read.php?52,723140,723140#msg-723140</link>
            <description><![CDATA[ I have a problem.  I have a web page with a &quot;join.php&quot; subpage.  Someone has found a way to POST to the page making it look like they have filled in the form and hit &quot;Submit&quot;.  They have included their name &quot;SEFUSHWWDSDF&quot; and their address &quot;1247 FKHSFH&quot; and an email ie &quot;laurenwade30@gmail.com&quot;.  <br />
<br />
I&#039;m guessing: just for the &quot;L&quot; of it, being allowed to post spam to a group, whatever ...<br />
<br />
Suggestion on how to cut this SOB off at the knees.  Thanks]]></description>
            <dc:creator>chuck lidderdale</dc:creator>
            <category>PHP</category>
            <pubDate>Mon, 04 Mar 2024 19:37:51 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,723071,723071#msg-723071</guid>
            <title>More CPU Usage (no replies)</title>
            <link>https://forums.mysql.com/read.php?52,723071,723071#msg-723071</link>
            <description><![CDATA[ HI<br />
I am getting more cpu usage at heavy traffic.<br />
<br />
Online users 600 requests per sec<br />
Max. concurrent connections	2400<br />
Almost 8000 select queries per seconds<br />
<br />
Configuration values:<br />
<br />
innodb buffer pool size: 85GB<br />
thread_cache_size=500;<br />
read_buffer_size=6291456;<br />
max_connections=2500;<br />
innodb_print_all_deadlocks=ON;<br />
innodb_io_capacity=1000;<br />
innodb_lru_scan_depth=100;<br />
innodb_flush_neighbors=2;<br />
innodb_max_dirty_pages_pct_lwm=1;<br />
innodb_max_dirty_pages_pct=1;<br />
innodb_change_buffer_max_size=50;<br />
sort_buffer_size=8388608;<br />
range_optimizer_max_mem_size=16777216;<br />
innodb_flush_log_at_trx_commit=2;<br />
key_cache_age_threshold=7200;<br />
key_cache_block_size=16384;<br />
key_cache_division_limit=50;<br />
join_buffer_size=3145728;<br />
table_open_cache=9216;<br />
binlog_expire_logs_seconds=259200;<br />
log_queries_not_using_indexes=OFF;<br />
slow_query_log =OFF;<br />
key_buffer_size=268435456;<br />
log_error_verbosity=1;<br />
read_rnd_buffer_size=1048576;<br />
<br />
Whatever queries we are using with index and joins executed in 0.005 seconds maximum, but the same queries take over 20 seconds when more users are online.<br />
<br />
Please suggest to need any changes in  MySQL values<br />
<br />
Thanks<br />
Srinivas]]></description>
            <dc:creator>Srinivas Pokala</dc:creator>
            <category>PHP</category>
            <pubDate>Wed, 28 Feb 2024 08:39:51 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,712014,712014#msg-712014</guid>
            <title>requête sql  avec SUM ? (2 replies)</title>
            <link>https://forums.mysql.com/read.php?52,712014,712014#msg-712014</link>
            <description><![CDATA[ Bonjour à tous,<br />
Je ne suis pas débutant en php, ni  avec  mysql, mais j&#039;ai pas mal perdu depuis environ  10 ans ( raison médicale, peu importe .. )<br />
<br />
<br />
<br />
J&#039;ai besoin d&#039;un coup de pouce pour ce  type  de requête:<br />
<br />
$sql = &#039;SELECT year,visits, SUM(visits) FROM stats WHERE year=$year ORDER BY year &#039;;<br />
 [ en gros, il me faut connaître le nombre de visites  / an sur mon site.. ]<br />
 Et J&#039;ai  des colonnes &quot;années /mois/ visits )<br />
<br />
<br />
Merci d&#039;avance pour votre aide et vos lumières !<br />
Guillaume.]]></description>
            <dc:creator>Guillaume Daudet</dc:creator>
            <category>PHP</category>
            <pubDate>Fri, 15 Dec 2023 20:06:55 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,710685,710685#msg-710685</guid>
            <title>Feedback on a free PHP code security scanner in beta (4 replies)</title>
            <link>https://forums.mysql.com/read.php?52,710685,710685#msg-710685</link>
            <description><![CDATA[ Hey everyone!<br />
<br />
My name is Theo and my team and I have recently finished working on quite a big project that&#039;s currently in beta. It&#039;s a PHP code security scanner and we are asking programmers who&#039;s code of choice happens to include PHP to maybeee check it out and give us some feedback so we could improve it?<br />
<br />
It&#039;s a win-win cause you get a free &amp; comprehensive tool to scan your PHP code for vulnerabilities and we get feedback from people like us but with a fresh pair of eyes!<br />
<br />
Idk if this message would be considered spam if I attached a link though so I&#039;m going to post this first and see if any mods get back to me aha. All I want is some feedback but for some reason my posts get flagged as spam if they include links :(<br />
<br />
Anyway, would anyone be interested in something like this?]]></description>
            <dc:creator>Theo Grant</dc:creator>
            <category>PHP</category>
            <pubDate>Mon, 04 Dec 2023 09:22:09 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,710352,710352#msg-710352</guid>
            <title>I&#039;m searching for where the data is, in a php driven website. (no replies)</title>
            <link>https://forums.mysql.com/read.php?52,710352,710352#msg-710352</link>
            <description><![CDATA[ Hi, I was handed a website to maintain, such as update pictures and text.  I have access to the website&#039;s control panel, source files, ftp privilege, etc.  The website is written in php.<br />
<br />
I have been searching for where the data is located and think it is in a mysql format.  Every webpage source I examine just calls another php page, which calls another php page, which calls another php page, etc.<br />
<br />
The website is fully functional, no code problems.  But there are a few sentences that need changing and I still haven&#039;t found the location of the sentences.<br />
<br />
I am still digging through the php scripts being called and will have some code examples to post that seem to be pretty standard calls I have found elsewhere on the internet.<br />
<br />
I do perl, javascript and html so this environment is new to me.<br />
<br />
Thanks]]></description>
            <dc:creator>C Scheppers</dc:creator>
            <category>PHP</category>
            <pubDate>Tue, 31 Oct 2023 02:37:17 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,710210,710210#msg-710210</guid>
            <title>How to track DB changes automatoacally (no replies)</title>
            <link>https://forums.mysql.com/read.php?52,710210,710210#msg-710210</link>
            <description><![CDATA[ How can we track the changes that we do in database structure. Curranty we are manually maintaining the sql in a file that we do in our local and are executing them while moving to production. Thanks]]></description>
            <dc:creator>Shanthini G</dc:creator>
            <category>PHP</category>
            <pubDate>Tue, 17 Oct 2023 09:30:35 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,709114,709114#msg-709114</guid>
            <title>critical error when updating wordpress (2 replies)</title>
            <link>https://forums.mysql.com/read.php?52,709114,709114#msg-709114</link>
            <description><![CDATA[ I was trying to update my wordpress to latest version on my wordpress site but it now just displays an empty screen and says there has been a critical error on website. what can be the reason and how to solve? luckily i saved backups before updating but prefer to solve the problem without deleting the entire files and db and reloading]]></description>
            <dc:creator>Ahmet Tuter</dc:creator>
            <category>PHP</category>
            <pubDate>Thu, 27 Jul 2023 08:38:47 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,708570,708570#msg-708570</guid>
            <title>PHP Uncaught mysqli_sql_exception: Access denied for user (1 reply)</title>
            <link>https://forums.mysql.com/read.php?52,708570,708570#msg-708570</link>
            <description><![CDATA[ I try to run an apache webserver on an Ubuntu 22.04 LTS server.<br />
<br />
I installed mysql (8.0.32), php (8.1.2) and apache2. I manage the mysql instance remotely via mysql workbench on a windows machine<br />
<br />
The MySQL has a DB which I can configure locally and via the workbench;<br />
I defined an user for the DB which has mysql access via the ubuntu commandline via mysql -u user -p<br />
&lt;password&gt;<br />
<br />
In mysqld I changed the listening addresses:<br />
# bind-address		= 127.0.0.1<br />
bind-address            = 127.0.0.1,192.168.x.y<br />
# mysqlx-bind-address is for the X plugin<br />
mysqlx-bind-address	= 127.0.0.1,192.168.x.y <br />
<br />
<br />
I connect to the DB using php like this<br />
        $host = &#039;localhost&#039;; // &quot;127.0.0.1&quot;<br />
        // $username = &quot;mr_x&quot;; // new pas type<br />
        $username = &#039;mr_y&#039;; // old pw type<br />
        $password = &#039;&lt;thepassword&gt;&#039;;<br />
        $dbname = &#039;some_db&#039;;<br />
<br />
try {<br />
        //  Establish connection to database use mysqli<br />
		//$mysqli = new mysqli(&quot;localhost&quot;, &quot;username&quot;, &quot;password&quot;, &quot;databaseName&quot;);<br />
		$conn = new mysqli($host,$username,$password,$dbname);<br />
		$conn-&gt;set_charset(&#039;utf8mb4&#039;);<br />
<br />
This SHOULD imho work ... however it does not ...<br />
<br />
PHP Fatal error:  Uncaught mysqli_sql_exception: Access denied for user &#039;mr_y&#039;@&#039;localhost&#039; (using password: YES) in /var/www/etc.<br />
<br />
I have tried all kind of options to fix this issue even temporarily installing php8.2 (ubuntu is running in an VM), which did not solve the problem. So I did revert to the formal 8.1 version<br />
<br />
Given all the effort I put in trying to solve the problem ...<br />
I Sincerely hope any one has a clue / knows how to fix this !!]]></description>
            <dc:creator>Louis at oracle</dc:creator>
            <category>PHP</category>
            <pubDate>Wed, 29 Mar 2023 13:43:38 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,707555,707555#msg-707555</guid>
            <title>Mysql Gone Away Error (1 reply)</title>
            <link>https://forums.mysql.com/read.php?52,707555,707555#msg-707555</link>
            <description><![CDATA[ Hello,<br />
<br />
I updated mysql 5.7 to mysql 8. I am getting &quot;Mysql Gone Away&quot; error. I didn&#039;t change any configuration. What should I do?]]></description>
            <dc:creator>tayfun gulr</dc:creator>
            <category>PHP</category>
            <pubDate>Thu, 23 Feb 2023 20:28:55 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,707477,707477#msg-707477</guid>
            <title>A single user registration breaks registration/login system but how? (2 replies)</title>
            <link>https://forums.mysql.com/read.php?52,707477,707477#msg-707477</link>
            <description><![CDATA[ Short version ... sign/up login system in PHP/MySQL suddenly stopped working/failing silently no php errors in logs, nothing.<br />
<br />
After check after check I decided to look at  the database, I don&#039;t what made me do it, a hunch I suppose, I removed the last user that registered from the user table in DB. Low and behold signup/login are working again.<br />
<br />
Can anyone shed any light on what this could be? I need to make sure this does not happen again and I am stumped right now as to what the exact cause is...]]></description>
            <dc:creator>Paul Maher</dc:creator>
            <category>PHP</category>
            <pubDate>Wed, 05 Apr 2023 08:09:48 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,707215,707215#msg-707215</guid>
            <title>schematisation relation entre tables sql (no replies)</title>
            <link>https://forums.mysql.com/read.php?52,707215,707215#msg-707215</link>
            <description><![CDATA[ Bonjour à tous,<br />
<br />
je m&#039;initie à la manipulation de phpmyadmin et j&#039;essaie de créer des relations entre différentes tables, mais je ne sais pas si je m&#039;y prend bien...<br />
<br />
Mon organisation a établir est la suivante :<br />
<br />
J&#039;ai des medecins qui sont, soit indépendants (travaillant seuls), soit des medecins faisant parti d&#039;un cabinet médical.<br />
Pour chaque médecin, je dois associer des &quot;catégories&quot; qui sont :<br />
- coordonnées<br />
-infos diverses<br />
-consignes<br />
<br />
Voici donc ma propre logique pour la création des relations des tables :<br />
<br />
Table &quot;medecins&quot; contient deux tables (&quot;independants&quot; et &quot;cabinet médical&quot;)<br />
<br />
La où je bloque, c&#039;est la suite des relations car je ne sais pas comment relié les tables &quot;infos&quot;, &quot;consignes&quot; et &quot;coordonnées&quot;<br />
<br />
Quelqu&#039;un saurait il me dire ou me conseiller sur ce qui serait le plus pratique svp ?<br />
<br />
Merci]]></description>
            <dc:creator>Manuel Baranger</dc:creator>
            <category>PHP</category>
            <pubDate>Sat, 14 Jan 2023 09:32:33 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,706884,706884#msg-706884</guid>
            <title>php script for join, using group by based on user input (no replies)</title>
            <link>https://forums.mysql.com/read.php?52,706884,706884#msg-706884</link>
            <description><![CDATA[ I have been trying for a couple days to get my code to group by a StockCode and list all of the associated alternates.  I get the listing and can use the variable inputs from users to pull up what is needed but visually it can be hard to look at since the stock code is listed repeatedly for each alternate part associated with the StockCode.  <br />
<br />
When I tried to perform a group by in workbench to test the script it gives me a 1055 error.  Can someone help.  My query code snippet is below.  <br />
<br />
$result = mysqli_query($con,&quot;SELECT <br />
qadb.cm_dbo_invmaster.StockCode,						  qadb.cm_dbo_invmaster.Description,						  qadb.cm_dbo_mfr_mfrpn.ManufacturerName,						  qadb.cm_dbo_mfr_mfrpn.ManPartNumber,						  qadb.cm_dbo_mfr_mfrpn.CageCode<br />
FROM qadb.cm_dbo_invmaster INNER JOIN qadb.cm_dbo_mfr_mfrpn<br />
ON qadb.cm_dbo_invmaster.StockCode = qadb.cm_dbo_mfr_mfrpn.StockCode<br />
WHERE qadb.cm_dbo_invmaster.StockCode Like &#039;&quot;.$NumberCriteria.&quot;&#039;<br />
AND qadb.cm_dbo_invmaster.Description Like &#039;&quot;.$DescriptionCriteria.&quot;&#039;<br />
GROUP BY qadb.cm_dbo_invmaster.StockCode						<br />
ORDER BY qadb.cm_dbo_invmaster.StockCode&quot;);<br />
<br />
The Query works until I put in the Group By Statement.]]></description>
            <dc:creator>Rebecca Hudson</dc:creator>
            <category>PHP</category>
            <pubDate>Thu, 01 Dec 2022 20:31:19 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,706728,706728#msg-706728</guid>
            <title>Can anyone help me with this Query? (no replies)</title>
            <link>https://forums.mysql.com/read.php?52,706728,706728#msg-706728</link>
            <description><![CDATA[ Basically my goal is to have a multiple filter in my small project that I&#039;m working.<br />
I have a page for Rooms or Lobby.<br />
<br />
Filters are:<br />
<br />
Privacy : ( 0 / 1 / 2 ) 0 = All / 1 = Public / 2 = Private<br />
<br />
Status : ( 0 / 1 / 2 / 3 ) 0 = ALl / 1 = Open / 2 = In Progress / 3 = Completed<br />
<br />
Created By Me: ( True or False )<br />
<br />
Joined Room: ( True or False )<br />
<br />
I also have 2 tables.. One for Rooms and other for Room_users<br />
<br />
<br />
| User ID | Name   |<br />
| -------- | -------- |<br />
| 1       | Me     |<br />
| 2       | Raven   |<br />
| 3       | Gabby   |<br />
<br />
<br />
| Room ID | Title     | Privacy | Status | User ID   |<br />
| -------- | ----------- | -------- | -------- | ---------- |<br />
| 1       | My Room   | 1       | 1       | 1         | &lt;&lt;&lt; Me/I&#039;m the Creator/Host<br />
| 2       | Raven Room | 2       | 1       | 2         | &lt;&lt;&lt; Raven is the Creator/Host<br />
| 3       | Gabs Room | 1       | 1       | 2         | &lt;&lt;&lt; Raven is the Creator/Host<br />
<br />
<br />
| Room Users | Room ID   | User ID | Status |<br />
| ---------- | ---------- | -------- | -------- |<br />
| 1         | 2         | 1       | 1       |<br />
| 2         | 2         | 3       | 2       |<br />
| 3         | 3         | 3       | 1       |<br />
<br />
Here, Me and UserID#3 joined to Room ID#2 (Raven Room)<br />
<br />
**Status**: 1 = Pending / 2 = Joined<br />
<br />
The result should display, Rooms based on the filter..<br />
Here&#039;s my current query:<br />
<br />
$userID = My ID / UserID# 1<br />
<br />
<br />
<br />
$status = ($status != &quot;0&quot;) ? &quot;AND `a`.`status` = &#039;&quot;.$status.&quot;&#039;&quot; : &quot;AND `a`.`status` != &#039;0&#039;&quot;;<br />
$privacy = ($privacy != &quot;0&quot;) ? &quot;AND `a`.`privacy` = &#039;&quot;. $privacy .&quot;&#039;&quot; : &quot;AND `a`.`privacy` != &#039;0&#039;&quot;;<br />
<br />
<br />
<br />
&quot;SELECT a.room_id, a.title, a.status, a.privacy, a.user_id, b.room_id, b.user_id, b.status, c.user_id, c.name<br />
      FROM `rooms` as `a`<br />
      LEFT JOIN `room_users` as `b` ON `a`.`room_id` = `b`.`room_id`<br />
      LEFT JOIN `user` as `c` ON `b`.`user_id` = `c`.`user_id`<br />
      WHERE (`a`.`user_id` =  &#039;&quot;. $userID .&quot;&#039; OR (`b`.`status` != &#039;1&#039; OR `b`.`user_id` = &#039;&quot;. $userID .&quot;&#039;)) &quot;. $status .&quot; &quot;. $privacy .&quot; ORDER BY `a`.`room_id` DESC&quot;<br />
<br />
When i filter Privacy: All, it should return this ff:<br />
1. all rooms that is public<br />
2. all rooms that I&#039;m member of (Private). Else, it should be exluded.<br />
<br />
Filter: Privacy: Public should only display all rooms with status 1 (Public)<br />
<br />
Filter: Privacy: Private should only display all rooms that **I&#039;m member of**.<br />
<br />
when I filter Created By Me, it should display only rooms that I created.<br />
<br />
when I filter Joined Room, it should display only the rooms that I&#039;m member of.<br />
<br />
Right now, according to my query it only returns room that I joined in and the room I created.<br />
<br />
And it displays multiple duplicated rooms, but I used array_unique to return only the unique rooms. I CAN&#039;T use **GROUP BY** since it has a problem with MySQL regarding sql_mode=only_full_group_by and for some reason I dont have access on doing that.<br />
<br />
Can anyone help me with how to construct the query for the database, so it will return the accurate data that i needed..<br />
<br />
<br />
Any help is very much appreaciated.]]></description>
            <dc:creator>DR Rom</dc:creator>
            <category>PHP</category>
            <pubDate>Thu, 10 Nov 2022 17:12:21 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,706634,706634#msg-706634</guid>
            <title>Will the size of a Postgres database&#039;s uuid index be smaller than that of MySQL or InnoDB? (no replies)</title>
            <link>https://forums.mysql.com/read.php?52,706634,706634#msg-706634</link>
            <description><![CDATA[ Will the size of an index on an uuid column in Postgres be less than it is in MySQL / InnoDB?]]></description>
            <dc:creator>Pawan Kumar</dc:creator>
            <category>PHP</category>
            <pubDate>Thu, 03 Nov 2022 05:34:54 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,706135,706135#msg-706135</guid>
            <title>INSERTING RECORDS INTO MULTIPLE TABLES (1 reply)</title>
            <link>https://forums.mysql.com/read.php?52,706135,706135#msg-706135</link>
            <description><![CDATA[ I was trying to insert records into multiple tables in one file.  The first two queries ran very well but the third one did not run. The first table is normal table while the last 2 tables are cross-reference tables, which store primary keys of two tables each. Here is the code snippets for your help: <br />
<br />
// initialize prepared statement<br />
    $stmt = $con-&gt;stmt_init();<br />
                                           <br />
    $insert_product = &quot;INSERT INTO  products (cat_id, manufacturer_id,date,product_title,product_url,product_img1,product_img2,product_img3,product_price,product_keywords,product_desc,product_features,product_video,seo_keywords,product_label,product_sale ) VALUES(?, ?, NOW(), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)&quot;;<br />
    // bind parameters and execute statement<br />
    if ($stmt-&gt;prepare($insert_product)) {<br />
        // bind parameters and execute statement<br />
        $stmt-&gt;bind_param(&#039;iisssssisssssss&#039;, $cat, $manufacturer_id, $product_title, $product_url,$product_img1,$product_img2,$product_img3,$product_price,$product_keywords,$product_desc,$product_features,$product_video, $product_seo,$product_label,$product_sale );<br />
        $stmt-&gt;execute();<br />
        if ($stmt-&gt;affected_rows &gt; 0) {<br />
            echo &quot;&lt;script&gt;alert(&#039;Product has been inserted sucessfully&#039;)&lt;/script&gt;&quot;;<br />
        }<br />
    }<br />
<br />
    // if the product entry was inserted successfully, check for sizes<br />
    if (($stmt-&gt;affected_rows &gt; 0) &amp;&amp; isset($_POST[&#039;size&#039;])) {<br />
        // get the product&#039;s primary key<br />
        $product_id = $stmt-&gt;insert_id;<br />
        foreach ($_POST[&#039;size&#039;] as $size_id) {<br />
            if (is_numeric($size_id)) {<br />
                $values[] = &quot;($product_id, &quot; . (int) $size_id . &#039;)&#039;;<br />
            }<br />
        }<br />
        if ($values) {<br />
            $sql = &#039;INSERT INTO product2size (product_id, size_id) VALUES &#039; . implode(&#039;,&#039;, $values);<br />
            // execute the query and get error message if it fails<br />
            if (!$con-&gt;query($sql)) {<br />
                $sizeError = $con-&gt;error;<br />
            }<br />
        }<br />
    }<br />
    <br />
    //  third query <br />
    // if the product entry was inserted successfully, check for product categories<br />
    <br />
        if (!isset($sizeError) &amp;&amp; isset($_POST[&#039;product_cat&#039;])) {<br />
            // get the product&#039;s primary key, my issue is this , the last query is parallel to this one, that is why I am still putting last insert id of product table and is not working<br />
            $product_id = $stmt-&gt;insert_id;<br />
            foreach ($_POST[&#039;product_cat&#039;] as $p_cat_id) {<br />
                if (is_numeric($p_cat_id)) {<br />
                    $values[] = &quot;($product_id, &quot; . (int) $p_cat_id . &#039;)&#039;;<br />
                }<br />
            }<br />
            if ($values) {<br />
                $sql = &#039;INSERT INTO product2pcat (product_id, p_cat_id) VALUES &#039; . implode(&#039;,&#039;, $values);<br />
                // execute the query and get error message if it fails<br />
                if (!$con-&gt;query($sql)) {<br />
                    $pcatError = $con-&gt;error;<br />
                }<br />
            }<br />
        }<br />
    <br />
<br />
My problem is that I wouldn’t know what I will put where I put last insert Id in the third query since, it does not depend on the previous cross reference table.]]></description>
            <dc:creator>Sunday Olaoye</dc:creator>
            <category>PHP</category>
            <pubDate>Tue, 06 Sep 2022 19:23:14 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,705970,705970#msg-705970</guid>
            <title>where statement with OR matching placeholder (1 reply)</title>
            <link>https://forums.mysql.com/read.php?52,705970,705970#msg-705970</link>
            <description><![CDATA[ Hello,<br />
<br />
what is correct syntax for matching either one of two values to a single URL parameter using placeholder with OR in WHERE clause?<br />
<br />
WHERE (col1 = ? OR col2 = ?)<br />
<br />
WHERE (col1 OR col2) = ?<br />
<br />
thanks]]></description>
            <dc:creator>Paul Maher</dc:creator>
            <category>PHP</category>
            <pubDate>Wed, 24 Aug 2022 05:23:46 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,705856,705856#msg-705856</guid>
            <title>Echo date in dd-mm--yy format (4 replies)</title>
            <link>https://forums.mysql.com/read.php?52,705856,705856#msg-705856</link>
            <description><![CDATA[ I searched for a similar question in this forum but didn&#039;t see it. I apologize if asked previously. I am echoing into a table a date that is in &quot;dd-MM-yyyy hh:mm:ss&quot; format from a column called &quot;date_added&quot; in my db,  but I need to echo it in dd-MM-yy.<br />
<br />
I found some info on maybe using strtotime() to format but I&#039;m confused as to where to put the formatting info. The piece of code that echos the date is below.<br />
<br />
echo &quot;&lt;td&gt;&quot; . $row[&quot;date_added&quot;]. &quot;&lt;/td&gt;<br />
<br />
Any help is appreciated.]]></description>
            <dc:creator>Sean Schaffer</dc:creator>
            <category>PHP</category>
            <pubDate>Fri, 19 Aug 2022 16:02:21 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,705536,705536#msg-705536</guid>
            <title>PHP Mail (4 replies)</title>
            <link>https://forums.mysql.com/read.php?52,705536,705536#msg-705536</link>
            <description><![CDATA[ I cobbled an email script together and it&#039;s been running fine, but all of a sudden Gmail and AOL mail are dumping my stuff into spam folders.<br />
<br />
These are my headers:<br />
<br />
$headers .= &quot;From: &lt;Parker@database39.com&gt;&quot; . &quot;\r\n&quot;;<br />
$headers .= &quot;Reply-To: &lt;Parker@database39.com&gt;\r\n&quot;; <br />
$headers .= &quot;Return-Path: &lt;Parker@database39.com&gt;\r\n&quot;;   <br />
$headers .= &quot;X-Priority: 3\r\n&quot;;<br />
$headers .= &quot;X-Mailer: PHP&quot;. phpversion(7.4) .&quot;\r\n&quot; ;	<br />
<br />
Is there any code that can get around those damned filters.<br />
<br />
I&#039;m grateful for your wisdom . . .]]></description>
            <dc:creator>Parker Shannon</dc:creator>
            <category>PHP</category>
            <pubDate>Fri, 29 Jul 2022 12:21:29 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,705230,705230#msg-705230</guid>
            <title>suggest Best CMS for ecommerce website (1 reply)</title>
            <link>https://forums.mysql.com/read.php?52,705230,705230#msg-705230</link>
            <description><![CDATA[ Hello everyone, I want to create an e-commerce website for my offline computer store, as everyone knows that the world is moving to digital very rapidly. and nowadays most of the small and medium organizations moving online to serve their Product and their services to the maximum number of people, please suggest me which is the best e-commerce CMS for e-commerce,(Shopify, woo-commerce, Drupal, Magento, open cart), please suggest wich one is best. <br />
<br />
Thank You. ]]></description>
            <dc:creator>Gulshan Negi</dc:creator>
            <category>PHP</category>
            <pubDate>Fri, 22 Jul 2022 09:06:36 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,705131,705131#msg-705131</guid>
            <title>undefined function mysqli_result() (1 reply)</title>
            <link>https://forums.mysql.com/read.php?52,705131,705131#msg-705131</link>
            <description><![CDATA[ Hello I have problem and error: <br />
Fatal error: Uncaught Error: Call to undefined function mysqli_result() in C:\xampp\htdocs\unity\odczytDanych.php:13 Stack trace: #0 {main} thrown in C:\xampp\htdocs\unity\odczytDanych.php on line 13<br />
<br />
code:<br />
<br />
&lt;?PHP<br />
$tabela = $_POST[&#039;tabela&#039;];<br />
$gracz = $_POST[&#039;gracz&#039;];<br />
$zmiennaIN = $_POST[&#039;zmienna&#039;];<br />
<br />
<br />
$con = mysqli_connect(&quot;localhost&quot;,&quot;root&quot;,&quot;&quot;) or (&quot;Blad polaczenia: &quot;  . mysqli_error());<br />
if (!$con)<br />
	die(&#039;Nie mozna polaczayc: &#039; . mysqli_error());<br />
	<br />
mysqli_select_db($con, &quot;konta&quot;) or die (&quot;Nie mozna wczytac bazy danych&quot; . mysqli_error());<br />
<br />
$zmiennaOUT = mysqli_result(mysqli_query($con, &quot;SELECT &#039;&quot;.$zmiennaIN.&quot;&#039; FROM &#039;&quot;.$tabela.&quot;&#039; WHERE login=&#039;&quot;.$gracz.&quot;&#039;&quot;),0);<br />
die ($zmiennaOUT);<br />
<br />
?&gt;]]></description>
            <dc:creator>Kon Kom</dc:creator>
            <category>PHP</category>
            <pubDate>Tue, 12 Jul 2022 14:15:43 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,705031,705031#msg-705031</guid>
            <title>PHP FRAMEWORK (1 reply)</title>
            <link>https://forums.mysql.com/read.php?52,705031,705031#msg-705031</link>
            <description><![CDATA[ Hi, this is Palak Sharma.<br />
I am in final year of my engineering and after completion of third year I had taken course of PHP programming language. And now I have started coding in PHP but I need you people support to know that on which PHP framework I should work, can you guys give me your suggestions on that.<br />
I am waiting for some positive response.<br />
Thanks]]></description>
            <dc:creator>palak sharma</dc:creator>
            <category>PHP</category>
            <pubDate>Sat, 25 Jun 2022 10:10:32 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?52,704695,704695#msg-704695</guid>
            <title>Query grows slower as user activity increases (1 reply)</title>
            <link>https://forums.mysql.com/read.php?52,704695,704695#msg-704695</link>
            <description><![CDATA[ PHP Version: 7.3.19<br />
mysql version: 10.4.13 (Maria DB)<br />
I am running an application on Linux, using PHP and Mysql. We have multiple queries which runs perfectly fine when 20-25 people are using the application. But when the users are more than 30 users the query becomes very slow. there are more than 500 users which want to use this application. If one of the query takes 0.188844 seconds to execute, but when there are many users attempting to do the same activity at the same time, the processes becomes very slow and takes about 21.017460seconds to execute sometimes even more.<br />
<br />
below is some of examples from slow query log:<br />
===============# Time: 220601  7:42:44<br />
# User@Host: root[root] @ WIN-MN0PM3TE06L [10.15.51.252]<br />
# Thread_id: 41274  Schema: mahabhumi_prod8  QC_hit: No<br />
# Query_time: 0.188844  Lock_time: 0.000154  Rows_sent: 0  Rows_examined: 51848<br />
# Rows_affected: 0  Bytes_sent: 10337<br />
SET timestamp=1654049564;<br />
SELECT *<br />
FROM (`kcc_requests`)<br />
WHERE `aadhar_num` =  &#039;XXXXX&#039;;<br />
<br />
===============# Time: 220601 14:12:13<br />
# User@Host: root[root] @ WIN-MUQCJ3KLLE2 [10.15.51.250]<br />
# Thread_id: 81466  Schema: mahabhumi_prod8  QC_hit: No<br />
# Query_time: 21.017460  Lock_time: 0.000071  Rows_sent: 0  Rows_examined: 52692<br />
# Rows_affected: 0  Bytes_sent: 10337<br />
SET timestamp=1654072933;<br />
SELECT *<br />
FROM (`kcc_requests`)<br />
WHERE `aadhar_num` =  &#039;YYYYY&#039;;<br />
=================]]></description>
            <dc:creator>Jayshree Yeolekar</dc:creator>
            <category>PHP</category>
            <pubDate>Thu, 02 Jun 2022 15:53:25 +0000</pubDate>
        </item>
    </channel>
</rss>
