Jump to content

ironman

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ironman's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Nope, makes sense. Had to read it over a few times, but it makes sense. The period is what was getting me. Thanks a lot!
  2. Hello folks. I'm trying to add an additional recipient to an email generated by my system. I've done this successfully in the past by adding a comma after the first email, but in those situations everything was hard coded in. So for example I've done this, which seemed to work: $to = 'first@one.com' , second@one.com'; Now, however, I have a dynamic value and believe I can do it the same way, just want to run it by a few people before I do it. I'm not much of a PHP guy The code I want to manipulate is this: $to = $row["email"]; I think I can do this: (Feed back is appreciated) $to = $row["email"] , 'email@hopethisworks.com' ;
  3. Yeah that helped. I'll play around with it for a bit and repost if I have more questions. Thanks a lot!
  4. Hello everyone. I’ve been working on some general queries for the past few hours, but I’m pretty new to PHP/SQL and having some difficulty. I’ve created two tables within my database that I will run my queries from. Im using MySQL 5.0 through PHPMyAdmin. The first table has the following columns. Table “Master” Activity # Due Account # Owner Order # Service Region Status Reason Type SR Sub-Area Tech Instructions Company Driving Directions SR # VIP Repeat Service Flag Dwelling Cancelled Customer wants DPP Related SR Create QA QA Generated OMS Order Id Modified Activity # Source QA Activity The second table has the following columns Table “Supervisor” Last_Name First_Name User_ID Service_Region Tech_Team Tech_Supervisor The “Owner” in table master is the same as “User_ID” in table supervisor. So I can associate which “Owner” is on what “Tech_Team” or which “Owner” is under which “Tech_Supervisor” ect. I would like to generate the following query: (Breaking up the teams by statistics) • Team o Total Jobs Total amount of “Order # “ by each “Owner” by each “tech_team” o Completion % (“status” = “closed”) / (total number of order # by tech_team) o Cancelled (total number of status = canceled by tech_team) o Closed (total number of status = closed by tech_team) o Hold (total number of status = hold by tech_team) o Past Open (total number of status = past open by tech_team) o On Site (total number of status = on site by tech_team) The final report would look something like this: Total Jobs Comp % Cancelled Closed Hold Past Open On Site Team 3A 57 71.93% 16 41 1 1 1 Team 3B 27 85.19% 4 23 0 0 0 Team 4A 28 71.43% 6 20 2 2 2 Team 4B 52 67.31% 16 35 3 3 3 Team 5A 45 57.78% 17 26 2 2 2 Team 5B 0 #DIV/0! 0 0 0 0 0 Total Jobs 209 69.38% 59 145 8 8 8 So I know I need to first associate both tables together. Then comes the hard part of writing the code to do the actual query. This seems like a job for Superman. If anyone can find the time to assist, I’d appreciate it greatly!
  5. Thanks for the reply. I've changed the code to the following so that it should connect to the mssql database, but still the same error. Its gotta be a port issue, or something silly like that. Anyone else have any input? I changed the code to: <?php session_start(); set_time_limit(0); error_reporting(E_ALL); //complete "station\sqlexpress" with your particular case $SERVER = "localhost"; $ADMIN_NAME = "name"; //complete pass with your pass $ADMIN_PASS = "password"; //complete database witht the name of database you whant to connect to $DATABASE = "database"; $Conexion = mssql_connect($SERVER, $ADMIN_NAME, $ADMIN_PASS) or die ("Can't connect to Microsoft SQL Server"); mssql_select_db($DATABASE, $Conexion) or die ("Can't connect to Database"); ?> I've changed the $SERVER = "localhost"; and i've changed it to the ip address, as well as station\sqlexpress all with the same error message. The error message is: "Fatal error: Call to undefined function: mssql_connect() in c:\apache\htdocs\mastec\db_connect.php on line 14" Line 14 is "$Conexion = mssql_connect($SERVER, $ADMIN_NAME, $ADMIN_PASS)" Another note- I can: Connect to the database through Management Studio just fine (sql auth and windows auth) Verify SQL is running Verifed the user name and password for the db connect is active and works Verify SQL is running
  6. Thanks for your reply. I've tried changing it to localhost with no success. Do you think the issue has something to do with using dreamweaver to connect to my Microsoft SQL Server 2008 Express? Does the connection string need to change maybe? Right now, i've just tried to use the following connection string, but it does on the MSSQL_CONNECT line. <?php $hostname = "localhost"; $username = "name"; $password = "password"; $dbName = "database"; MSSQL_CONNECT($hostname,$username,$password) or DIE("DATABASE FAILED TO RESPOND."); mssql_select_db($dbName) or DIE("Table unavailable"); $query = "SELECT * FROM users"; $result = MSSQL_QUERY($query); $number = MSSQL_NUM_ROWS($result); $i=0; if ($number == 0) : print "No data?"; elseif ($number > 0) : print "Data: "; while ($i < $number) : $name = mssql_result($result,$i,"Name"); print $name; print " "; $i++; endwhile; endif; ?>
  7. Thanks! I havent actually gone through placing the code, but I can see how it should be done. I'm having database connection issues now, but that should be resolved soon. Thanks again, i'll update this as solved.
  8. Hello all. I'm having an issue connection to my database through Dreamweaver. I receive the following error message when I try to connect: "Error: 2005 Unknown MySQL Server Host " I am using XP Home Edition with Microsoft SQL Server 2008 Express along with Microsoft SQL Server Management Studio Express version 9.00.2047.00. Using the Management Studio I can connect to the SQL server just fine using both SQL Server Authentication or Windows Authentication. However when I try and make the connection within Dreamweaver I receive the above error message. I've searched around to see if it was something I had to enable within the SQL Server Configuration, but all research has led me to a dead end. As far as the connection through Dreamweaver, I use the following to try and connect. Connection Name: dataconn MySQL Server: COMPUTERNAME\SQLEXPRESS User Name: username Password: password Datbase: the correct database Any help would be much appreciated Thanks!
  9. I have reports based on data I export from my company database. I usually export the data into an excel spreadsheet, then within excel I create formulas that represent the info I place into my reports. (Average things, get percentages, ect) This entire task takes two hours on a goodnight so obviously I'd like to automate the process. So my thoughts were to create a php run site along with MySQL as its backed database. Does anyone have any suggestions on how to import my data daily into a master table within my MySQL database I've created? The data will be over written daily. Also a side note. I have the options to export my data in the following formats: 1. XML Spreadsheet 2. XML Data 3. Single File Web Page 4. Web Page 5. HTML 6. Unicode Text 7. CSV 8. WQ1 9. DBF 4(dBASE IV) 10. DIF (Data Interchange Format) 11. SYLK (Symbloic Link) 12. Comma Separated Text File Hope someone has some good pointers. Thanks!
  10. <!-- begin embedded QuickTime file... --> <table border='0' cellpadding='0' align="center"> <!-- begin video window... --> <tr><td> <OBJECT classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' width="280" height="250" codebase='http://www.apple.com/qtactivex/qtplugin.cab' > <param name='src' value="http://www.nugentappraisal.com/multimedia/video/Nugent.mov"> <param name='autoplay' value="true"> <param name='controller' value="true"> <param name='loop' value="false"> <EMBED src=" http://www.nugentappraisal.com/multimedia/video/Nugent.mov" width="280" height="250" autoplay="true" controller="true" loop="false" pluginspage=' http://www.apple.com/quicktime/download/'> </EMBED> </OBJECT> </td></tr> <!-- ...end embedded QuickTime file --> </table>
  11. I have a video on my home page that autoplays. I like the fact the video auto plays the first time you load the home page, but would like to know if there was a way (possibly with session cookies?) to remember if the person made a visit to the home page. If he did (and thus ha already seen the video) the video wouldnt auto load. The video would only auto load the first time a visitor has loaded the home page. Any help or suggestions would be much appreciated!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.