Jump to content


  • Posts

  • Joined

  • Last visited


Profile Information

  • Gender
    Not Telling

k4pil's Achievements


Member (2/5)



  1. Hi there ppl. I normally use jEdit for coding php. Its good but irs intended to be used for programming languages such as Java. Can any one recommend an editor for php which they have found particularly useful. Thanks in advance as always.
  2. hi ppl! Not sure if its in right the place, but here it goes I am trying to do some resarch on different types of databases, e.g. Spatial, temporal, relational etc. I want to compare the performance of these different types of databases when implementing different types of applications, e.g. CRM, financial data tracking etc. However, i have no idea where to start. Anyone with any suggestion Thanks in advance
  3. Hi there ppl. I have just tried to access my website and i get an error. Iv not viewed it for a few days. The error i am getting is; Warning: mysql_connect(): Too many connections in /home/kapi7150/public_html/connect.php on line 7 Unable to select database The file connect.php is included in the php script. Its as below; [code] <?php $username = "####"; $password = "####"; $database = "####"; mysql_connect("localhost",$username,$password); @mysql_select_db($database) or die( "Unable to select database"); ?> [/code] Ive never had this problem before...so am totally stuck. No idea where to look. Any help???
  4. Sooo simple...but soo effective. Ive been trying triggers, emailing scripts...u name it..lol Thanks pps for showing me the light **SOLVED**
  5. Ok,...but i have no idea of how to do it that way either...where do i start??? Can you give me some help on what i need to do something like that ??
  6. have you tried to execute your query in your database. If it is working fine in there then you where to look next.
  7. Hi there ppl! I think this question maybe a lil complex. I want to create a trigger in my mySql database which sends an email upon an event. I have a table case(caseID, custID, priority, subject, description, type, created, solved ) When a new row is added which has priority = "high" i want the database to send an email to all the users from another table in the database; staff( userID, staff, access, username, password, name, surname, email ) where access = "3". Email address is also recorded in this table. I have no idea how to do this. Anyone?? Thanks in advance as always!
  8. OK. Here it goes. I have a table; products(prodID, prodName, prodDesc, supplier, costPound, costPence) where prodID is unique. These are some rows from that database (apologies in advance about the stupid names ;b ); 108 nokia 6680 nokia £99.99 6 nokia 3310 phone nokia £199.99 2 skyline car nissan £30000.0 3 skyline car nissan £45000.99 4 skyline car nissan £40000.99 1 tizer fizzy drink coke £0.35 When i run a query when $prodName is 'car' [code] $query = "SELECT * FROM product WHERE productID = '$ID' OR prodName = '$prodName' OR prodDesc = '$prodDesc' OR supplier = '$supplier' OR costPound = '$costPound' OR costPence = '$costPence'"; $result = mysql_query($query); $num = mysql_numrows($result); [/code] The output is! 1 tizer fizzy drink coke £0.35 2 skyline car nissan £30000.0 5 mars choclate mars £0.35 9 car fast car lkj £1.2 These extra values are output no matter what is searched for. The only explanation is that the query is returning all rows where $prodName = 'car' aswell as those rows which have an empty field - as these do in the costPence column. Hope this makes sense. Any help?
  9. Its actually an int. What i meant was ; $query = INSERT in table1 values '' '2' '0' That zero causes it to be output no matter what the searcg criteria. e.g. Select * from table1 where fig2 = "5" will still output the row above. When i delete the rows with 0 values everything else works fine.
  10. Hi there ppl. Quick question. I am adding data to my database. But when i search the database i am getting all fields that are being searched for as well as those that are empty. e.g. If i add to my database as follow; table (uniqueID, fig1, fig2) $query = INSERT in table1 values '' '2' '3.0' $query = INSERT in table1 values '' '4' '5' And then if i search; $query = SELECT * from table1 WHERE figure2 = '4' both rows are returned because there is an 0 in fig2 in row 1. Any idea wots goin on???? Is it something to do with stripping empty chars?
  11. The below is not working SELECT * FROM activity WHERE userID = 2 AND WHERE time BETWEEN 19700101020000 AND 20060606000000 Im am trying to get all rows where userID is 2 and time is between those two numbers. Any help? ive somehow solved it by rearranging - SELECT * FROM activity WHERE WHERE time BETWEEN 19700101020000 AND 20060606000000 AND userID = 2
  12. Hi there people. I have a table called activity in my database as follows; ID acID time page 1 2 20060307205835 CRM Home 2 2 20060307205838 View customer detail 3 2 20060407205847 Inventory Home Page 4 2 20060407205911 CRM Home 5 2 20060607205916 Inventory Home Page 6 2 20060607212811 View Cases Screen 7 2 20060707212834 Create Case Screen I want to query this databse from a certain time to a certain time. I have got the query working; SELECT * FROM `activity` WHERE time REGEXP '20060307*' it returns everything starting with that, ignoring the digits after (those represent time so can be ignored). I want to be able to search from a date e.g 20060307 to 20060707. Any one have any idea how i can do this??
  13. XenoPhage was totally right. I used timestamp which is a datatype provided be mySql and everything is soooo much easier. For the benefit of webezine il go over what i have. Firstly a table called activity which lists the activity of users; activity(activityID, userID, time, pageAccessed) [code] $query = "INSERT INTO activity VALUES ('', '$userID', NOW(), '$pageTitle')";     $result = mysql_query($query); [/code] When i created the table in mySql, the syntax was something like [code] CREATE TABLE `activity` ( `activityID` INT( 11 ) NOT NULL , `userID` INT( 11 ) NOT NULL , `time` TIMESTAMP NOT NULL , `page` VARCHAR( 20 ) NOT NULL , UNIQUE ( `activityID` ) ) TYPE = MYISAM; [/code]
  14. Hi there ppl! Just a quickie... I want to output from an array. I am currently doing the below; [code] $time=mysql_result($result2,$i,"time");         $page=mysql_result($result2,$i,"page");                  //get the time and convert the string into an array         $str = $time;         $arr1 = str_split($str);                  echo "<b>Time:</b>";         echo $arr1[7];//day         echo "$arr1[8]/";//day         echo $arr1[5];//month         echo "$arr1[6]/";//month         echo $arr1[1];//year         echo $arr1[2];//year         echo $arr1[3];//year         echo $arr1[4];//year         echo " $arr1[9]";//time -h         echo "$arr1[10]:";//time -h[/code] It works fine. But is there a more efficient way of doing the same thing bacause it seems a lil long winded. Thanks
  15. Well the way the date is stored is; $time = date('l dS \of F Y h:i:s A'); and $time is inserted into the database. Any suggestions??
  • 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.