I built a site in PHP 5 and MySQL with a table that keeps track of scheduled photo shoots. I want to push out a feed of those scheduled "events" into an ical file.
I originally asked this question and got a good answer from S. Gehrig. I got a sample ical file working, and updating regularly in Google Calendar whenever I manually adjuste...
In MySQL, I store categories this way:
categories:
- category_id
- category_name
- parent_category_id
What would be the most efficient way to generate the trail / breadcrumb for a given category_id?
For example
breadcrumbs(category_id):
General > Sub 1 > Sub 2
There could be in theories unlimited levels.
I'm using php.
UPDATE:
I saw...
So it seems that cakePHP tables need a field called "name" or else the id number is displayed while testing out table relationships in the scaffold. Is there a way around this? instead of 'id' 'name' 'last_name' in my table, I want 'id' 'first_name' 'last_name'. I have to have a "name" field for every table in order to display the pr...
I'm trying to do something in a query that I've never done before. it probably requires variables, but i've never done that, and I'm not sure that it does.
What I want is to get a list of sales, grouped first by affiliate, then by it's month.
I can do that, but here's the twist... I don't want the month, but month 1, month 2, month ...
Please tell the query to find out size of the individual databases in the sql server 2005?
...
I am using mysql5.1 and wrote trigger after update.am using same table for insert and updae.
table contains field .id,itemid,value1 all are integer..
my trigger is:
CREATE DEFINER = 'root'@'%' TRIGGER `trig_same`
AFTER UPDATE
ON `vote`
FOR EACH ROW
BEGIN
insert into vote values(10,1,100);
END|
...but when i excute update com...
I have a data source on a Windows machine that supports an ODBC connection. I want to programmatically copy that entire data source to a MySql database every hour. Is there something faster than doing a select * from and then doing an insert for each row?
...
Hi,
Lets say I am analyzing how high school sports records affect school attendance.
So I have a table in which each row corresponds to a high school basketball game. Each game has an away team id and a home team id (FK to another "team table") and a home score and an away score and a date. I am writing a query that matches attendan...
We are using VB.NET and ASPx for our project. we would like to separate the aspx pages and put them on the IIS server (web server) on one m/c and the business logic and DAL layer on another IIS server (application server) on a different m/c .The database is on another m/c. Is such a configuration possible ? If so how can it be implemente...
table:
postid|userid|post|replyto
post sql
SELECT * FROM table WHERE postid=12
total replies sql
SELECT COUNT(*) AS total FROM table WHERE replyto=12
the expected result is the "post table" + how many replies to the post. replyto field is the target postid. somehing like :
postid|userid|post|replyto|totalreplies
Is there a possibi...
Hi
I have a requirement to run a server script on scheduled times entered by the user. This is for a program for scheduling emails. A user can enter the specific times when they want to send the mail. I have a table which stores the userid, the email text and the time at which the mail is to be sent. This time is defined in minutes. I d...
After the client into the key and other buttons appear ~ character, rather than go to the top of the line or the last surface
mysql>nsert into _
I press <Home> Key NOT appear:
mysql>_nsert into
Appear:
mysql>nsert into ~_
/etc/inputrc is corrected...
...
I need to store relative path of a document into a MySQL table. The problem is that when I insert a string of this form:
$urlPath ='\abc\def\fg.jpg'
into the relevant column, what I get is, I have all the slash '\' strip off, with an unknown symbol in front of all the text. So the result in the MySQL table is something like this:
'(w...
In Linux
In MySQL 4.0, I press <Home> the cursor will go to the beginning of line, but has no effect according to press <Home> in MySQL 5.1, it appear a "~" character only.
I press <Ctrl>+<A> the cursor go home
I press <Ctrl>+<E> the cursor go end
But in MySQL 4.0 I press <Home> Not <Ctrl>+<A>
My practice is to press <Home> <End> <D...
If I have a date such as mm/dd/yyyy. How can I get mysql to actually store the date in that format. Is this possible or do have to store it in the form of yyyy/mm/dd and convert it later?
What I want to do is insert a date in the mm/dd/yyyy format but the database will not allow it. It wants yyyy/mm/dd
...
I have to check for the existence of several tables from a shell script, without accessing the MySQL daemon. Is the presence of .frm files reliable to determine if the tables exist or not? Here's what I have been doing, but it doesn't seem to work all the time (there may be an error in another part of the system):
for table in $TABLES; ...
I have a MySQL table with an autoincremented id column. The id started from 1 and is now in the 4000s.
However, I also need to port some legacy data into this table from an old version of the application. The ids of this data start from 5000 and must be preserved for auditing purposes.
What happens if I insert an entry after my autoinc...
Hi All,
I want to restore mysql database through stored procedure? Is it possible?
Or can I copy dbfile and rename that folder?
Please let me know if anyone needs more information to answer this question.
Thanks in advance.
Regards,
Manasi
...
Hay all, i need a little hlep.
I'm trying to connect to my localhost MySQL server via php in the terminal.
It's outputting that it cannot connect to the host through my socket. My PHP ini install says this
MYSQL_SOCKET /tmp/mysql.sock
so i used
mysql_connect("/tmp/mysql.sock","root","","");
And i get errors
Any suggestions?
...
After finding a pretty nasty bug in the packaged 3.51.15 driver that came with ubuntu I downloaded and compiled the latest version from mysql's site.
Now im wondering how I can find out what version isql is actually using.
...