Most voted questions in PHP

0 votes
1 answer

How to export the MySql database structure without the data just the structure?

Hello @kartik, You can do with the --no-data option with ...READ MORE

Aug 18, 2020 in PHP by Niroj
• 82,880 points
2,285 views
0 votes
1 answer

How do I restore a dump file from mysqldump?

Hello @kartik, It should be as simple as ...READ MORE

Aug 18, 2020 in PHP by Niroj
• 82,880 points
913 views
0 votes
1 answer
0 votes
1 answer

How do I specify unique constraint for multiple columns in MySQL?

Hello @kartik, Use this: ALTER TABLE `votes` ADD UNIQUE ...READ MORE

Aug 18, 2020 in PHP by Niroj
• 82,880 points
4,373 views
0 votes
1 answer

How do you set a default value for a MySQL Datetime column?

Hello @kartik, In version 5.6.5, it is possible ...READ MORE

Aug 18, 2020 in PHP by Niroj
• 82,880 points
7,453 views
0 votes
1 answer

How to get the sizes of the tables of a MySQL database?

Hello @kartik, You can use this query to ...READ MORE

Aug 18, 2020 in PHP by Niroj
• 82,880 points
935 views
0 votes
1 answer

How to output MySQL query results in CSV format?

Hello @kartik, Using this command columns names will ...READ MORE

Aug 18, 2020 in PHP by Niroj
• 82,880 points
2,155 views
0 votes
1 answer

How to reset AUTO_INCREMENT in MySQL?

Hello @kartik, You can reset the counter with: ALTER ...READ MORE

Aug 18, 2020 in PHP by Niroj
• 82,880 points
546 views
0 votes
1 answer

How to get a list of user accounts using the command line in MySQL?

Hello @kartik, Use this query: SELECT User FROM mysql.user; Which ...READ MORE

Aug 18, 2020 in PHP by Niroj
• 82,880 points
1,295 views
0 votes
1 answer

How to get WordPress post featured image URL?

Hello @kartik, Try this code below: <?php if (has_post_thumbnail( $post->ID ...READ MORE

Aug 14, 2020 in PHP by Niroj
• 82,880 points
3,155 views
0 votes
1 answer

How to insert multiple rows from a single query using eloquent/fluent?

Hello @kartik, You can use the following approach. $data ...READ MORE

Aug 14, 2020 in PHP by Niroj
• 82,880 points
1,644 views
0 votes
1 answer

How foreach change original array values in php?

Hello @kartik, Do the following: foreach ($fields as $key ...READ MORE

Aug 14, 2020 in PHP by Niroj
• 82,880 points
8,229 views
0 votes
1 answer

How PHP Replace last occurrence of a String in a String?

Hello @kartik, You can use this function: function str_lreplace($search, ...READ MORE

Aug 14, 2020 in PHP by Niroj
• 82,880 points
2,746 views
0 votes
1 answer

Error:Undefined index: barangay in C:\xampp\htdocs\TextBlast\homepage\insert.php on line 22

Hello @ Regina, First checks whether a variable is ...READ MORE

Aug 14, 2020 in PHP by Niroj
• 82,880 points
5,436 views
0 votes
1 answer

Error: Warning: Illegal string offset 'host' in ....

Hello @kartik,  Try this way: $memcachedConfig = array("host" => ...READ MORE

Aug 14, 2020 in PHP by Niroj
• 82,880 points
2,829 views
0 votes
1 answer

How do I convert a PDF document to a preview image in PHP?

Hello @kartik, You need ImageMagick and GhostScript <?php $im = new imagick('file.pdf[0]'); $im->setImageFormat('jpg'); header('Content-Type: image/jpeg'); echo ...READ MORE

Aug 14, 2020 in PHP by Niroj
• 82,880 points
4,338 views
0 votes
1 answer

How to get parameters from a URL string?

Hello @kartik, You can use the parse_url() and parse_str() for that. $parts = ...READ MORE

Aug 14, 2020 in PHP by Niroj
• 82,880 points
639 views
0 votes
1 answer

How to get the request parameters in symfony2

Hello @kartik, The naming is not all that ...READ MORE

Aug 14, 2020 in PHP by Niroj
• 82,880 points
2,731 views
0 votes
1 answer

Fatal error: Class 'SoapClient' not found in C:\Program Files (x86)\EasyPHP-5.3.9\www\server.php on line 2

Hello @kartik, To install SOAP in PHP-7 run ...READ MORE

Aug 14, 2020 in PHP by Niroj
• 82,880 points
2,609 views
0 votes
1 answer

How to add slug to href?

Hello @aakash, You are not sending the variable ...READ MORE

Aug 11, 2020 in PHP by Niroj
• 82,880 points
911 views
0 votes
1 answer

Invalid argument supplied for foreach() on line 25. Error in my php and mysql

Hello @viven , This should be a simple fix ...READ MORE

Aug 4, 2020 in PHP by Niroj
• 82,880 points
3,922 views
0 votes
1 answer

Error:No Application Encryption Key Has Been Specified

Hello @kartik, Open command prompt in the root ...READ MORE

Jul 22, 2020 in PHP by Niroj
• 82,880 points
4,219 views
0 votes
1 answer

How to get the Last Inserted Id Using Laravel Eloquent?

Hello @kartik, Firstly create an object, Then set ...READ MORE

Jul 22, 2020 in PHP by Niroj
• 82,880 points
17,106 views
0 votes
1 answer

How Do I Get the Query Builder to Output Its Raw SQL Query as a String?

Hello @kartik, Use the toSql() method on a QueryBuilder instance. DB::table('users')->toSql() would return: select * ...READ MORE

Jul 22, 2020 in PHP by Niroj
• 82,880 points
841 views
0 votes
1 answer

How to connect to SQL Server database from JavaScript in the browser?

Hello @kartik, You shouldn´t use client javascript to ...READ MORE

Jul 21, 2020 in PHP by Niroj
• 82,880 points
23,472 views
0 votes
1 answer

Error:Cannot insert explicit value for identity column in table 'table' when IDENTITY_INSERT is set to OFF.

Hello @kartik, You're inserting values for OperationId that is an identity ...READ MORE

Jul 21, 2020 in PHP by Niroj
• 82,880 points
11,196 views
0 votes
2 answers

Error:“Cannot Connect to Server - A network-related or instance-specific error”?

Hello, The "sql server error 40" is appears mostly ...READ MORE

Aug 18, 2020 in PHP by Fantazma
• 140 points
28,468 views
0 votes
1 answer

How to select all records from one table that do not exist in another table?

Hello @kartik, You can either do like this: SELECT ...READ MORE

Jul 21, 2020 in PHP by Niroj
• 82,880 points
51,923 views
0 votes
1 answer

How to drop a table if it exists?

Hello @kartik, No. That will drop the table only ...READ MORE

Jul 21, 2020 in PHP by anonymous
• 82,880 points
544 views
0 votes
1 answer

How do I escape a single quote in SQL Server?

Hello @kartik, Single quotes are escaped by doubling ...READ MORE

Jul 21, 2020 in PHP by Niroj
• 82,880 points
5,913 views
0 votes
1 answer

How can I do an UPDATE statement with JOIN in SQL Server?

Hello @kartik, This should work in SQL Server: update ...READ MORE

Jul 21, 2020 in PHP by Niroj
• 82,880 points
679 views
0 votes
1 answer

How to Insert multiple rows in a single SQL query?

Hello @kartik, In SQL Server you can insert ...READ MORE

Jul 21, 2020 in PHP by Niroj
• 82,880 points
4,203 views
0 votes
1 answer

How to concatenate text from multiple rows into a single text string in SQL server?

Hello @kartik, Use COALESCE: DECLARE @Names VARCHAR(8000) SELECT @Names = ...READ MORE

Jul 21, 2020 in PHP by Niroj
• 82,880 points
2,828 views
0 votes
1 answer

How do I UPDATE from a SELECT in SQL Server?

Hello @kartik, In SQL Server, use MERGE MERGE INTO YourTable ...READ MORE

Jul 21, 2020 in PHP by Niroj
• 82,880 points
717 views
0 votes
1 answer

Error:Jquery .ajax method=“post” but $_POST empty

Hello @kartik, Instead of method: "post" you need to use type: ...READ MORE

Jun 16, 2020 in PHP by Niroj
• 82,880 points
3,359 views
0 votes
1 answer

How to call a php function from ajax?

Hello @kartik, You can't call a PHP function ...READ MORE

Jun 16, 2020 in PHP by Niroj
• 82,880 points
12,344 views
0 votes
1 answer

How to post the parameter in ajax call of jquery datatable?

Hello @kartik, Just pass it like a normal ...READ MORE

Jun 16, 2020 in PHP by Niroj
• 82,880 points
17,491 views
0 votes
1 answer

Error:Sending Form file with form using AJAX

Hello @kartik, Don't pass the files into the ...READ MORE

Jun 16, 2020 in PHP by Niroj
• 82,880 points
3,489 views
0 votes
1 answer

Error:uncaught exception: out of memory in Ajax Process

Hello @kartik, From your description of being redirected ...READ MORE

Jun 16, 2020 in PHP by Niroj
• 82,880 points
1,515 views
0 votes
1 answer

Error: Failed to load resource: net::ERR_CACHE_MISS

Hello @kartik, It is actually a permission issue. ...READ MORE

Jun 16, 2020 in PHP by Niroj
• 82,880 points
1,654 views
0 votes
1 answer

Error:Jquery - Uncaught TypeError: Cannot use 'in' operator to search for '324' in

Hello @kartik, You have a JSON string, not ...READ MORE

Jun 16, 2020 in PHP by Niroj
• 82,880 points
6,487 views
0 votes
1 answer

How to Execute PHP function with onclick?

Hello @kartik, In javascript, make an ajax function, function ...READ MORE

Jun 16, 2020 in PHP by Niroj
• 82,880 points
21,898 views
0 votes
1 answer

How do I get a YouTube video thumbnail from the YouTube API?

Hello @kartik, Each YouTube video has four generated ...READ MORE

Jun 16, 2020 in PHP by Niroj
• 82,880 points
5,050 views
0 votes
1 answer

How to cache fetched data in react without redux?

Hello @kartik, The best way to save data ...READ MORE

Jun 1, 2020 in PHP by Niroj
• 82,880 points
992 views
0 votes
1 answer

How to get Redux Form data in another Component?

Hello @kartik, What you need to do is ...READ MORE

Jun 1, 2020 in PHP by Niroj
• 82,880 points
3,905 views
0 votes
1 answer

MySQL - UPDATE multiple rows with different values in one query

Hello @kartik You can use a CASE statement to handle ...READ MORE

Jun 1, 2020 in PHP by Niroj
• 82,880 points
33,183 views
0 votes
1 answer

How to put an 'if clause' in an SQL string?

Hello @kartik, For your specific query, you can ...READ MORE

Jun 1, 2020 in PHP by Niroj
• 82,880 points
786 views
0 votes
1 answer

How can I create XAMPP/Apache serve file outside of htdocs?

Hello @kartik, You can relocate it by editing ...READ MORE

May 19, 2020 in PHP by Niroj
• 82,880 points
2,508 views
0 votes
1 answer

How can I connect to a Tor hidden service using CURL in PHP?

Hello @kartik, I use Privoxy and cURL to scrape Tor ...READ MORE

May 19, 2020 in PHP by Niroj
• 82,880 points
4,977 views
0 votes
1 answer

How to find the php.ini file from the command line?

Hello @kartik, You can get a full phpinfo() using : php ...READ MORE

May 19, 2020 in PHP by Niroj
• 82,880 points
50,966 views