-
A small problem
Date: 12/08/05
(SQL Server) Keywords: database, sql
I am having some issues starting a procedure. I need to create a sql procedure where the user creates a new dog in a database. The information that is going to be inserted is : gender first, which will stop the program if not identified in the database, breed, which will go under unknown if there is no existing record in database, owner id, which will go under ORPHAN if no existing record, eye color, which will create a new entry for a new eye color is not already in DB, and finally create the dog with dog_id once all the other parts are taken care of. I need to have exception handling in this procedure as well. I would like someone to help me to start this.
Source: http://www.livejournal.com/community/sqlserver/37683.html
-
PHP Email
Date: 12/07/05
(PHP Community) Keywords: php, mysql, sql, linux, google, apache
Hello everyone
I've got a little bit of a problem, @ work I run PHP on apache which then runs on Win2k Server. For email I have just edited the php.ini and changed
SMTP =
smtp_port = 25
to point at our exchange server. Now here's the hard part @ home I run a linux server, well 2, 1 is my mailserver and various other stuff the other is my dev box, apache/mysql/php. How/what do I need to change to get my dev box to send mail to my mailserver ? I've had a look on google but drawn a blank.
My dev box is called pm-sr02, mailserver called pm-sr01.
Thanks for any answers
Source: http://www.livejournal.com/community/php/375707.html
-
asp - database connection - help me i'm drowning.
Date: 12/08/05
(Asp Dot Net) Keywords: database, asp, sql, web
hello all.. ok here's the story...
i know some basic asp .. i've edited a database driven website fro a while.
I'm no trying to create a new site .. thats also database driven.
How do i connect to the server in order to pull info from it?
I tried following the trail from the site i currently update but i'm not sure what i'm seeing here...
Anyone know how to connect an asp site to a sql 2003 database?
Source: http://www.livejournal.com/community/aspdotnet/51038.html
-
I'm at a loss
Date: 12/10/05
(PHP Community) Keywords: php, mysql, sql, apache
This may be because my brain is fried after a format and reinstallation of everything but I can't seem to see the resolution to this problem.
I'm getting this: Fatal error: Call to undefined function mysql_connect() in...
I'm running PHP 5.1.1 as an Apache 2.0 module using MySQL5 on WinXP. I've been over php.ini several times and everything appears in order, and all the .dll's exist in their correct place, but it continues to insist it does not know the function.
Help is appreciated.
Source: http://www.livejournal.com/community/php/377171.html
-
Finding AVG of multiple columns
Date: 12/10/05
(MySQL Communtiy) Keywords: mysql, sql
Say I have a row with three scores:
taste=4
price=3
value=3
Can mysql figure the average of these three columns with one query?
Source: http://www.livejournal.com/community/mysql/75966.html
-
SELECT TOP and LIMIT
Date: 01/01/70
(Programming) Keywords: programming, mysql, database, sql
I was doing a little programming with a MySQL database today and I ran into a little snag. I am really familiar with using a MSSQL database and was trying to limit my results the same way I do in...
Source: http://www.coreycollins.com/blog/archives/000075.php
-
visual stuidio 2005 help
Date: 12/11/05
(Asp Dot Net) Keywords: database, asp, sql
I've created 2 pages, one to display data from a database and another to insert data. I'm having trouble with the sql insert query.
The first page displays data fine, not in the format I'd like but one thing at a time.
How do I on the second page, create text boxes and the proper connections to insert data into my database. I'm pretty sure this is a simple basic step but I can not figure it out.
Any help or tutorials? I usually hit www.asp.net when I’m stuck and their tutorial is not helping on this one.
Thanks!
Source: http://www.livejournal.com/community/aspdotnet/51352.html
-
Sql query
Date: 12/12/05
(MySQL Communtiy) Keywords: php, mysql, database, sql
I've just set up a testing server on a windows platform, it's not ideal but it's better than nothiing, for myself, when trying to create a table in a database, either manually or thru phpmyadmin, the MySQL server stops responding. I'm using the latest release of MySQL although that seems not to matter as it seemed to do it with an earlier version. Any ideas on this??
Source: http://www.livejournal.com/community/mysql/76242.html
-
Global Find and Replace?
Date: 12/12/05
(MySQL Communtiy) Keywords: mysql, sql
I am trying to globally replace a character in mysql. Specifically, I would like to replace the string '#&39symbol#&39;' with the string '\'symbol\''. Al already know how to do the update/replace operation, but in this case that's not sufficient. The string could potentially appear in any field of any table, so it needs to be global. Does anyone know a way to do a global find and replace, or have a script already written to do this? I am willing to do it on my own if necessary, but I figure there's no point in reinventing the wheel.
Thanks,
Patrick
Source: http://www.livejournal.com/community/mysql/76327.html
-
Query Help
Date: 12/13/05
(PHP Community) Keywords: mysql, sql
I am not very experienced at writing queries that pull from several tables...
Can anyone tell me why $maillist
has 639 results when it should have only 8 (where assgo.aprivi='m'
) ?
code
$maillist = array();
$Link = mysql_connect ($Host, $User, $Password);
$Query = "SELECT fb_user.emailAddress, fb_user.ustatus, passgo.aprivi, member_services.salesAlert
FROM fb_user, passgo, member_services
WHERE fb_user.ustatus='active' AND passgo.aprivi='m' AND member_services.salesAlert='y'
";
$Result = mysql_db_query ($DBName, $Query, $Link);
if (!$Result) {
print("$Query
\n");
echo 'MySQL Error: ' . mysql_error();
exit;
}
while($Row = mysql_fetch_array ($Result)) {
$email = $Row['emailAddress'];
$type = $Row['aprivi'];
$send = $Row['salesAlert'];
$maillist[] = array($email, $type, $send);
}
mysql_close ($Link);
Solution:
$Query = "SELECT
u.userID,
u.emailAddress,
ui.cats,
p.aprivi,
ms.salesAlert
FROM fb_user AS u
INNER JOIN passgo AS p ON u.userID = p.goID
INNER JOIN member_services AS ms ON u.userID = ms.serviceID
LEFT JOIN fb_user_interest AS ui ON u.userID = ui.userID
WHERE u.ustatus='active'
AND p.aprivi='m'
AND ms.salesAlert='y'";
Source: http://www.livejournal.com/community/php/378930.html
-
Arrays and functions?
Date: 12/13/05
(Web Development) Keywords: database, asp, sql
Amazingly enough, I've *just* started using functions with my ASP code, even though I've been doing ASP for a little while now.
Right now, I'm only using a function to deal with connecting to my database and retrieving information based on the SQL I use.
In several cases, however, I need to use multiple recordsets for part of a page's content. It gets a little tiresome to use the same function over and over.
Is there a way that I could store all of my SQL statements in an array and then use that array in my function so that it would run through however many items there are in the array (this could not be a static number, since one page might use four different statements and another might use three), run all the SQL statements, and then put the results in different recordsets?
Or..would it just be easier to make one huge SQL statement, like
SELECT table1.field1, table2.field1, table2.field2, table3.field5 FROM table1, table2, table2 WHERE
... etc?
Sorry if this question seems inordinately stupid.
Source: http://www.livejournal.com/community/webdev/278824.html
-
the web hosting question...
Date: 12/14/05
(Web Development) Keywords: php, mysql, database, sql, web, apache
I was wondering if anyone could recommend me a webhost that will meet the following requirements:
+ I want as much control as possible. If I decide one week I want to mess around with OracleDB, I want to be able to install it. If I want to use Ruby on Rails, I want to be able to install that too. I basically want to be able to do as much server administration as possible
+ I have the following musts: PHP 5, Apache, MySQL(preferred, but some kind of database)
+ I need a decent amount of space and bandwidth, but not a whole lot.
I have considered a dedicated server, but it seems to be far too expensive for now at least. Any ideas?
Source: http://www.livejournal.com/community/webdev/279180.html
-
Cross dependency
Date: 12/14/05
(MySQL Communtiy) Keywords: php, mysql, sql
SQL Query:
----------
SELECT grps.groupid, grps.title, grps.description, grps.approved, grps.create_date, grps.leaderid, user.username AS leadername, grps_categories.catid, grps_categories.title AS catname, grps_setting.image_name, grps_setting.private_posts, grps_setting.moderate_members, grps_setting.hidden_group, grps_setting.edit_details
FROM grps_setting
LEFT JOIN user ON (user.userid = grps.leaderid)
LEFT JOIN grps ON (grps.groupid = grps_setting.groupid)
LEFT JOIN grps_categories ON (grps_categories.catid = grps.catid)
WHERE grps.groupid = 1;
Error Message:
--------------
MySQL Error : Cross dependency found in OUTER JOIN. Examine your ON conditions
Error Number : 1120
My Question:
------------
where's the cross dependency and why does this cause the query to malfunction?
x-posted to php_mysql
Source: http://www.livejournal.com/community/mysql/76794.html
-
Dropdowns
Date: 12/14/05
(Javascript Community) Keywords: php, mysql, database, sql, java
Hi, I have some questions regarding the best way to go about creating dynamic dropdowns in javascript.
I have to create a form with two dropdown lists. One for US states the other for counties within those states. The county dropdown will remain blank until the user selects a state, then the county dropdown will be populated with the correct counties for that state.
I have this working using PHP (the rest of the application is PHP) but I want to do it without reloading the page. The list of states and counties are stored in 2 tables in a mysql database.
My first instinct is use PHP to write the javascript for me. Do the DB work with PHP and then write the javascript arrays. But that seems wrong.
I would think that the javascript should go something like this and would be called from an onchange handler in the state dropdown. I dont know the exact syntax.
create function setOptions(id)
create array of counties indexed with their id's from the database
if there is an id passed to the function
iterate through the array of counties
if a key matches the id then write that to the options tag of the county select list
Is that the right direction? Any pointers would be much appreciated.
Thanks
Source: http://www.livejournal.com/community/javascript/88041.html
-
Fulltext index error
Date: 12/16/05
(MySQL Communtiy) Keywords: mysql, sql
This is bound to be something simple I've overlooked (and besides, I'm new at this)...
First, the table. Created from a pre-existing spreadsheet for a community library so please forgive the non-optimum design...
mysql> create table books (
-> book_id mediumint unsigned not null auto_increment,
-> author1 varchar(255) not null,
-> author2 varchar(255) not null,
-> title varchar(255) not null,
-> subtitle varchar(255) not null,
-> subject1 varchar(255) not null,
-> subject2 varchar(255) not null,
-> subject3 varchar(255) not null,
-> subject4 varchar(255) not null,
-> publisher varchar(255) not null,
-> year smallint unsigned not null,
-> loc varchar(255) not null,
-> edition varchar(255) not null,
-> isbn varchar(255) not null,
-> location varchar(255) not null,
-> notes varchar(255) not null,
-> PRIMARY KEY (book_id)
-> );
Query OK, 0 rows affected (0.01 sec)
Then a data import (load data local infile "/home/lev/Desktop/test.csv" into table books;) - no problem.
Then adding a fairly large fulltext index i.e.,
mysql> alter table books add fulltext index (author1, author2, title, subtitle, subject1, subject2, subject3, subject4, publisher, location);
But a search, any search e.g.,
mysql> select * from books where match (author1,author2) against ('ali');
ERROR 1191 (HY000): Can't find FULLTEXT index matching the column list
help?
Source: http://www.livejournal.com/community/mysql/77082.html
-
Full text based search SQL
Date: 12/18/05
(PHP Community) Keywords: cms, php, mysql, sql
How do you make your site searches? I am constructing (yet another) CMS of late and am once again at the issue of searching. I am trying to build an SQL statement that will do a full text search of looking in several fields and then ranks each return so they can then be ordered by that before looping them out in php.
How do other people do this? have you found a particular way of doing this that you find works well. My current solution isn’t the most efficient method out there.
Thanks
X-posted to mysql
Source: http://www.livejournal.com/community/php/380708.html
-
Full text based search SQL
Date: 12/18/05
(MySQL Communtiy) Keywords: cms, php, sql
How do you make your site searches? I am constructing (yet another) CMS of late and am once again at the issue of searching. I am trying to build an SQL statement that will do a full text search of looking in several fields and then ranks each return so they can then be ordered by that before looping them out in php.
How do other people do this? have you found a particular way of doing this that you find works well. My current solution isn’t the most efficient method out there.
Thanks
X-posted to php
Source: http://www.livejournal.com/community/mysql/78074.html
-
SQL Server 2005 Developer VS Express Editions
Date: 12/19/05
(Asp Dot Net) Keywords: programming, sql
I just got a new computer and I'm setting it up so I can do my programming work at home. I still need to install a SQL server, and even though my company doesn't use it I'm looking at 2005 because quite frankly I don't feel like installing 2000 AND 2005 and having multiple instances running. I'm wondering between downloading either SQL Server 2005 developer edition or the Express Edition. Cost isnt' an issue since I have a MSDN license at work, I don't want to have to DL 2 CDs worth of data if I don't have to. Does anyone know more about the features of these 2 versions and whether or not I should really prepare for the future with a DEV edition or if I should just go with the lightweight Express edition. One thign is though that I'd like easy integration into the VS IDE, and I read that SQL Express integrates into VS Express, but my Version is the Professional Edition, so I don't know if they will integrate also. Its not a necessity but it would be a nice thing to have since everyone seems to be going that direction while I'm still manually writing SQL script. Any feedback would be appreciated. BTW computer power isnt' an issue either. I have an AMD 4400+ X2 with 1 gig of ram.
Source: http://www.livejournal.com/community/aspdotnet/51909.html
-
making code secure
Date: 12/19/05
(PHP Community) Keywords: php, sql, google
Are there tools I can use to test my scripts for injections, prior to releasing to the public?
If there are standalone products would you be so kind as to provide the name, so I can google a download page?
If there are pages explaining how to actually do php/sql injections could someone provide that too?
Source: http://www.livejournal.com/community/php/381657.html
-
The results pane has been cleared to conserve server resources.
Date: 12/20/05
(SQL Server) Keywords: sql
Is there any way to stop this from occurring?
(SQL Server 2000, most recent service pack applied.)
Thanks.
Source: http://www.livejournal.com/community/sqlserver/37960.html