Home » Databases » Page 2
How do you replace the first two chars in field for two?
We have had a script running that enters codes into a stock field, but with two additional characters at the start, such as this:
I want to replace the "es" with "fr". There are hundreds. I'm sure there is a 'REPLACE' script but cannot quite work out how to do it. I'd say it should do it only if it finds 'es' as well, in case there are som

require, require_once, include: which and why?
Syntax: [ Download ] [ Hide ]Syntax: [ Download ] [ Show ][Mon Mar 31 11:07:25 2014] [error] [client] PHP Notice:  Constant DBHOST already defined in /var/www/vhosts/site.co.uk/httpdocs/dbconn.php on line 9
[Mon Mar 31 11:07:25 2014] [error] [client] PHP Notice:  Constant DBUSER already defined in /var/www/vhost

Can't enter SQL commands phpMyAdmin
I'm using Debian(jessie). I created a database(Cars) using phpMyAdmin's Create database function. I'm following along a book "The Joy of php". After the table is created the author wants to create a table (INVENTORY) using SQL commands. Well, phpMyAdmin will not let me enter any text in the SQL query text area. I created the table using the Create table function(buttons). If I click

Problem setting up connection to MySQL
Hey guys and gals,
I am a noobie to programming and these boards so first greetings to everyone. I started learning html/css/php/mysql a couple of weeks ago and think I am progressing nicely but as I got into databases I started having some set up problems. A couple of stats:
Mac OSX Mountain Lion
XAMPP 1.8.3-3
PHP 5.5.9.
I am learning from TheNewBoston tutorials and all

Upload Large Database
I have 5GB database that need to upload in phpmyadmin.There is any solution that can less time to upload it?Please do help me by showing step in uploading the sql file. I have search through internet but could not understand.

how do i FORMAT OUTPUT from php-mysql database
i got a php code on internet that works fine. It retrieves details of suppliers from a mysql table "suppliers". All column headings are displayed horizontally.
It retrieves data and displays as shown below:
1 | TOM | XYZ | ABC | 123

Localhost !
Hi..I am new and beginner in programming. I try to display live data at localhost by http://localhost/alimtest/ but it show this error.
Server error!
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
If you think this is a server error, please contact the webmaster.
Error 500<

How do I reset a column in my database every x days?
I am a PHP beginner.
Every x days (every 7 days for example), I would like all the values in a certain column in my MySQL database to reset back to '1'. How do I do this?
Please note: My web host does NOT have the MySQL event scheduler enabled so that is not an option. Also, my web hosting plan does not allow me to do cronjobs so that is not option either. Any other ideas?

Can you spot if one of more fields have the same data?
We have an issue where one or more fields of the database has the same data in it - ie same product stock codes.
We use this to show tickboxes on screen to select "additional accessories".
Trouble is, for whatever reason we have "mini ***" and then "small ***", which are actually the same product.
I'm not bothered about disabling one to be seen, but moreso creating a simple page th

Join two table and fetch data!
I have two table and want to fetch data from them.
This query working fine:
"Select * from myads join users on myads.id = users.id";
but the problem is I want to use one of the field as counter
For the Single table this works for me:
"SELECT *,(30-DATEDIFF(now(),updateDate)) as counter FROM myads";
Now, my question is how can i combine this two querys.. any help will

Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .