Seems phpmyadmin trims the end of the sql output when running operation commands ..
I really need phpmyadmin to show the full output
Any Ideas?
After a quick search on Google i found this: http://wiki.phpmyadmin.net/pma/Config#MaxCharactersInDisplayedSQL
It seems that you just have to edit the config file of PHPmyadmin and set $cfg['MaxCharactersInDisplayedSQL'] = 1000; to the value you want.
My problem was even more simple. I was using "show create table", but the result was truncated after a handful of chars.
PHPMyAdmin actually has a small "+options" link over the results, with simple options like "truncate results". Just needed to untick that !
If you want to edit the files mentionned by Torr, look for :
config.default.php, in 'librairies" folder, which contains existing parameters
config.inc.php, where you should copy/paste the ones you need to.
Related
I have the a textarea with the following value:
I save this value with php into my mysql database.
The result looks like this via phpmyadmin:
Now, I send a query with php to get the result and to show this text like this, to show it with line breaks:
<? echo nl2br($row->text); ?>
But the result will shown many withspaces. here the source code:
Where is my fault? :/
The result looks like this via phpmyadmin
phpadmin ist a webpage with html, it doesn't show consecutive blanks.
Where is my fault? :/
Somewhere between reading it out of the textarea, writing it into the database and reading it back from there.
Steps to track your problem.
What is transferred from the textarea to the server?
Check how the value is in your database.
Output the length of this string to get a simple idea of what really is in the database.
Then if you know if the string already got wrong into the database or the error occurs only when reading it, you can go on looking at this particular place.
How can i get result if word wrong or spelling wrong or Greek word enter get English result
example:
in my web site i want to search "jeans" or "jenz" get same result its a simple examples my main concern if user enter same meaning word or wrong greek word but my site develop in English format how can this word search
can any one give me idea how i get solution for this problem my site in Laravel 5.2
For the "spelling wrong" part (Did you mean)
You could do some LIKE queries in the db e.g. LIKE %j%e%a%n%s% but if you want to do it well, you should use a search library like this:
https://github.com/TomLingham/Laravel-Searchy
http://tnt.studio/blog/did-you-mean-functionality-with-laravel-scout
You can publish the configuration file to your app directory and
override the settings by running php artisan vendor:publish to copy
the configuration to your config folder as searchy.php
You can set the default driver to use for searches in the
configuration file. Your options (at this stage) are: fuzzy, simple
and levenshtein.
You can also override these methods using the following syntax when
running a search:
By defining levenshtein distance you can finetune how far off a word can be.
If you need better performance you should consider something like solr or elasticsearch for this task.
https://wiki.apache.org/solr/SpellCheckComponent
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-fuzzy-query.html
For the translation part
You just should have a dictionary ready in your database or localization files and run the input trough that as well. Expect high computing times for both spelling correction and translation in your code.
I have many posts in wordpress. In that post I have links like dev.dev.example.com now I want it to replace with dev.example.com.
I am using following query
UPDATE `dbname`.`wp_posts` SET `post_content`= replace(cast(post_content as varchar(max)), '%dev.dev.example.com%', '') WHERE CONVERT(`post_content` USING utf8) LIKE '%dev.example.com%'
I think it is better to follow wordpress' official guide when moving a wordpress website. http://codex.wordpress.org/Moving_WordPress
Alternatively, as an easy way in your case if you have already done all other steps but stuck in this issue, you can export database to sql file, open in text editor like notepad, use find-and-replace to replace all x.com to y.tom and then import the database. But remember that if domain length is different, you will have some settings lost. It is because wordpress keeps serialized data where length is stored.
Using your way to do via query is not a robust way because some other tables may still have old domain name.
I have worked with MySQL before but it has been a LONG time ago. Now I am trying to set up a database using phpMyAdmin.
I am trying to setup this database for the Article Friendly script. The instructions state that you need to use a little script that they have furnished:
define("DB_NAME","a6852953_article");
define("SERVER_NAME","'mysql12.000webhost.com'");
define("USER_NAME","a6852953_article");
define("PASSWORD","*********");
$dbhost=SERVER_NAME;
$dbuser=USER_NAME;
$dbpasswd=PASSWORD;
$dbname=DB_NAME;
It chokes on the first line, and if I remove that it chokes on whatever is there.
The syntax looks correct to me with what little I remember and I also checked the manual for 5.1 which is what my host uses.
Can anyone spot anything wrong?
Looks like it might actually be choking on the second line...
define("SERVER_NAME","'mysql12.000webhost.com'");
... likely because you have single quotes inside the double quotes. Try changing the line to this:
define("SERVER_NAME","mysql12.000webhost.com");
If it is the first line however, make sure that the database you listed already exists -- if not, you should be able to login to phpMyAdmin and run:
CREATE DATABASE a6852953_article
:)
In an attempt to redesign a website, I put this page together by hand. However, there are currently over 100 more shows already that need to be added, and three new shows get added every year.
In the old system, a text document was used as a makeshift 'database'; it stored data about each show, with shows separated by '#' and data fields separated with ']'. Here's an excerpt:
#The Whorl of the Leaves]WhorlOfTheLeaves]3]F]167
#Aladdin]Aladdin]8]N]0
#A Christmas Carol]XmasCarol84-]7]N]0
#The Feral Child]FeralChild]7]N]118
#Camelot]Camelot]11]N]169
A PHP script was then used to extract the information about each show and make the page seen here.
I'm sure a script could be used to put together a page such as the one shown above, but it seems like there should be a better system than a text document to store the information.
My question is: if the text document 'database' is working, should I bother changing it? Is there a better way to organize the information about each show?
SQLite would be prefect for you. It's a tiny database that requires no configuration or setup - yet comes built into most PHP installs.
Just use PDO and your good.
$db = new PDO('sqlite:/path/to/here/mydb.sq3');
$db->query('SELECT * FROM shows');
Yep, there are a ton of "better" ways of doing this. But if you're happy with it and it works, why change it?
You could save yourself a lot of trouble by using a content management system such as drupal.