Results 1 to 6 of 6

Thread: php / mysql error Again

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Newcastle
    Posts
    260

    Resolved php / mysql error Again

    Ok this time the code below should query the db and flag if there are 2 records already in the db matching the time and date, yet it doesnt - however as before with my other problems it works fine on my test server so any clues any one

    PHP Code:
    $alarm_check "SELECT atime, datetoplay FROM maintable WHERE atime = '" $_POST['alarmtime'] . "' And datetoplay = '" $_POST['datebox'] . "'"// check if username exists in database.

            
    if (!($alarm_check)) print mysql_error();
            
    $result1 mysql_query($alarm_check);
            
    $num_row mysql_num_rows($result1);
        
            if (
    $num_row == 2)
                
            {
                die(
    '<p align="center"><strong><font face="Century Gothic">Im sorry but this time slot is full.</font></strong></p><p align="center"><font face="Century Gothic"><a href="newentry.php">Please go back and pick another time</a></font></p><p align="center"><a href="index.html"><img src="images/smallhouse.gif" alt="Home" width="53" height="67" border="0"></a></p>');
                
    //die ($num_row);
            

    many thanks chrisio
    Last edited by Chrisio; Dec 5th, 2004 at 12:52 PM. Reason: resolved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width