I got this tutorial from the Internet. But I don't even have a basic understanding on how backup of a MySQL database through PHP would work.
http://goo.gl/YK5P
Can you recommend some sites that I can use as a reference so that I can study it?
...
Are there any PHP login scripts around that I can learn from?
I want to have a control panel that shows different options to different users depending on level of privilege.
...
I have four tables I want to join and get data from. The tables look something like...
Employees (EmployeeID, GroupID[fk], EmployeeName, PhoneNum)
Positions (PositionID, PositionName)
EmployeePositions (EployeePositionID, EmployeeID[fk], PositionID[fk])
EmployeeGroup (GroupID, GroupName)
[fk] = foreign key
I want to create a query t...
Running an EXPLAIN on some of my query tests have resulted in slow ALL joins even with indexes.
How do I make a MYSQL query with the following information more efficient?
Tables
counter: id (pk), timestamp, user_id (fk)
user: id (PK), username, website_id (fk)
website: id (pk), sitename
SELECT t2.usern...
Hi, I need to attach unlimited attributes to a record in a table, and I've already designed a system using #3 below using mysql. Unfortunately I am finding that searching across a million records is getting slow. Is #2 a better approach, or is there a better way alltogether? Is this a case for using a view? I'd like to have my keys ...
Hi guys - I have a freelance project where I have to build a news articles based website. Let me go over it a bit. The site is such that you have a super admin and you have writers - writers join the website by sending in an application along with a sample of their writing skills - if approved the admin approves them and an account is cr...
I am attempting to execute the following query via the mysqldb module in python:
for i in self.p.parameter_type:
cursor.execute("""UPDATE parameters SET %s = %s WHERE parameter_set_name = %s""" % (i,
float(getattr(self.p, i)), self.list_box_parameter.GetStringSelection()))
I keep getting the error: "Unknown column 'M...
import MySQLdb
and
traceback:
Traceback (most recent call last):
File "D:\zjm_code\sphinx_test\a.py", line 1, in <module>
import MySQLdb
File "D:\zjm_code\sphinx_test\MySQLdb\__init__.py", line 19, in <module>
import _mysql
ImportError: No module named _mysql
...
How do projects like BrowserCMS for Rails implement version control for a CMS? What is best practice for version control with database content? How does it relate to git/svn?
...
In the readme file for mypysql, under the Installation section, all that is written is the following:
$ svn export http://mypysql.svn.sourceforge.net/svnroot/mypysql mypysql
$ cd mypysql
$ make compile
$ sudo make install
Where would I execute such code?
...
I am building a rating system, and i want to insert a new row, if the name field does not already contain the name i want to insert, and if it does exist, i want to increase the count field by 1
For example, if i have a row the the name 'Tom' and i try to insert another row with the name 'Tom, then i want to +1 for the field count on th...
Does SQLite support seeding the RANDOM() function the same way MySQL does with RAND()?
$query = "SELECT * FROM table ORDER BY RAND(" . date('Ymd') . ") LIMIT 1;";
From the MySQL Manual about RAND(N):
If a constant integer argument N is
specified, it is used as the seed
value, which produces a repeatable
sequence of column va...
Hi,
I need some help with this code from PHP Classes, that's supposed to export MySQL to Excel.
I'm getting the following error:
Parse error: syntax error, unexpected T_SL in excelwriter.inc.php on line 100
This is line 100:
[Line100] function GetHeader()
{
$header = <<<EOH
<html xmlns:o="urn:schemas-...
Hi, I've come across something that seemed simple before but has me scratching my head again. I have a table for users:
user_id (PK) | username| email | something
... and a table for "views" for when one user has viewed another user:
view_id (PK) | viewer_id | viewed_id | view_date
The "viewer_id" and "viewed_id" are both user_ids,...
I am trying to use php. I wrote a small script as instructed in the tutorial. I am using Wampserver 2.0. Connection is fine. But whenever I try to execute the script, I get "Apache HTTP server encountered a problem and needs to close" error message. My localhost is working fine. Normal php scripts without mysql statements in it is workin...
Facebook's user id's go up to 2^32 .. which by my count it 4294967296.
mySQL's unsigned int's range is 0 to 4294967295 (which is 1 short - or my math is wrong)
and its unsigned big int's range is 0 to 18446744073709551615
int = 4 bytes, bigint = 8 bytes
OR
Do I store it as a string?
varchar(10) = ? bytes
How will it effect efficien...
Hi, I have a ruby script inside a Rails project. The script includes environment.rb so that Rails gets loaded etc. It then listens to data on a TCP socket of another server, parsing it to keep a mysql database up to date.
I'm using the daemons gem to be able to start and stop the process easily. Iv had the script running in production w...
i got have 3 id in a string
let $x="6,3,5"
now i want to get all color information from tbl_color where color id are
6, 3 and 5.
i made this query, whats wrong with this
$sql=" SELECT * FROM tbl_color WHERE color_id IN(".explode(',',$x).")
please suggest right query
...
Level: PHP Learner
I'm stuck with a checkbox problem. I have a db that contains names and unique id numbers.
Using a query, I am pulling a selection of students and showing them to a user in an ultra simple HTML table on a form. Each row begins with a checkbox. The method is POST. So far, so good. My table kinda looks like this:...
I have a few questions about using mysql and oracle in a PHP app.
1)
Is it possible to code my PHP app to easily switch between these 2 databases? (Use MySQL for a year and then easily switch a "DB" file and it will run on Oracle?) I believe some large PHP projects have support for multiple database types.
2)
Does Oracle have some...