Jump to content

Redlightpacket

Members
  • Posts

    68
  • Joined

  • Last visited

    Never

Posts posted by Redlightpacket

  1. I have looked up on the web for some good tutorials, so I haven't really found any "SIMPLE ONES". I'm looking for a good simple tutorial on how to make your page continue and continually load data when you scroll down the page. Will need ajax to pull some data from the database. I looked at 9Lessions tutorial on page load data jquery, but it's pretty complex. I tried to make it work in an example and it didn't work. But, all I'm looking for is a very simple tutorial on how to make a page load data jquery. Thanks..............

  2. Try this, this way works for me

     

    $query = "SELECT * FROM  Cards";
    
    $result = mysql_query($query)
    or die("Query failed: " . mysql_error());
    
    
    while ($row = mysql_fetch_assoc($result))
    {
    
    
    //Prints the id numbers in the table. The id numbers go from 1 and forever
    //You will need to set a primary key and it will be the primary id number in your mysql table
    
    echo $row['id'];
    //Prints row numbers
    }
    
    
    
    

  3. Not really sure what you are talking about a little bit. But this is where I would start. Hopefuly this might help you some way.

     

     

    <?PHP
    
    
    
    
    
    
    $query = "SELECT * FROM  Cards";
    
    $result = mysql_query($query)
    or die("Query failed: " . mysql_error());
    
    
    while ($row = mysql_fetch_assoc($result))
    {
    
    
    $Cards_ID[1] = $row['Cards_ID'];
    $Cards_MemberID[1] = $row['Cards_MemberID'];
    $Cards_Card[1] = $row['Cards_Card'];
    $Cards_DateTime[1] = $row['Cards_DateTime'];
    }
    
    
    
    
    
    Array
    (
        [889557275612] => Array
    	(
    	    [0] => Array
    	        (
    	            [Cards_ID] => 51
    	            [Cards_MemberID] => 889557275612
    	            [Cards_Card] => 308292114653
    	            [Cards_DateTime] => 1969-12-31 18:00:00
    	        )
    
    	    [1] => Array
    	        (
    	            [Cards_ID] => 51
    	            [Cards_MemberID] => 889557275612
    	            [Cards_Card] => 308292114653
    	            [Cards_DateTime] => 1969-12-31 18:00:00
    	        )
    
    
    ?>
    
    

  4. I'm trying to make a profile page like on social networks and I can't get the id=333334444 to stay at the top of the page or in the query string when I send post a message. I want the id=3333334444 to stay in the query string all the time when i'm on the certain user profile page, for example like when I post a message on the profile page. This stuff has been a little tricky to figure out. But I need a little documentation on this subject or something that will help me.

     

    Thanks a lot,

     

    ~~~~Chris Clark

  5. Here is my error message I get.

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[1] = 'listen'' at line 1

     

    Some how it won't write data in the first and next and next fields in my database table.

     

     

    
    
    //Trying to make this data go into the database table.
    
    //SET
    $column=array("listen","date","message");
    $value=array("listen","date","message");
    
    
    //WHERE
    $column2=array("video","listen","date");
    $value2=array("video","listen","date");
    
    
    
    $counts = 1;
    while($counts < 4)
    {
    $counts = 0 + $counts;	
    $n = 1;
    $n2 = 1;
    $n = 0 + $n;
    $n2= 0 + $n2;
    
    $result =  mysql_query("UPDATE _0_sermon_data_file SET $column[$n] = '$value[$n]' WHERE column2[$n2] = '$value2[$n2]'")
    or die(mysql_error());
    
    
    }
    
    
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////
    

     

  6. Some how the line below will not work.

    I'm trying to make the current date input into the database when I insert data into the database.

     

     

    $query = "CREATE TABLE IF NOT EXISTS _0_calendar_data(id SMALLINT NOT NULL AUTO_INCREMENT PRIMARY KEY, news TEXT(1200),  date INT(30), date2 INT(30))";

     

     

    //The one right here needs attention

    $result = "INSERT INTO _0_calendar_data(id, news, date, date2) VALUES (NULL, '$news', 'YEAR: Auto CURDATE()', CURDATE())";

  7. Ok, Please read more into this question than it is acually it is. What I want to do is make my sentence on the screen break line by line in a table when I have data to display. I have written a little code to try to do this, but it seems to hard and complicated. What I was wondering does cakePHP provide a function that does this. If not can you give me some code or another framework that could cut out all of the work to reinvent the wheel.

     

    I would dearly appreciate your help.

  8. I need some help trying to get my UPDATE to work the right way for this particular piece of code. I am really confused here.

     

    $array = array('p', $user);
    $com = join("", $array);
    
    //test me
    echo $com;
    
    
    $query = "CREATE TABLE IF NOT EXISTS $com(id SMALLINT NOT NULL AUTO_INCREMENT PRIMARY KEY, bio VARCHAR(450), idea VARCHAR(450), location VARCHAR(50))";
    
    $table1 = mysql_query($query)
    or die("Query failed: ".mysql_error());
    
    
    //$query = "UPDATE $com SET idea = $idea, bio = $bio, location = $location, WHERE id = "1"";
    
    
    //Here is my update statement, when I run the script, it says there is an error in this line.
    
    $result =  mysql_query("UPDATE $com SET bio = '$bio', idea = '$idea' location = '$location' WHERE id = '1'")
    or die(mysql_error());
    

  9. Here is my code right here. I need some help with displaying the image in the code. I might be having a bug.

    $query = "SELECT * FROM picture_tb";
    
    $result = mysql_query($query)
    or die("Query failed: " . mysql_error());
    
    
    while ($row = mysql_fetch_assoc($result))
    {
    echo'<table border="1">
    <tr>
    <td>';echo $row["id"];echo'</td>
    
    
    
    
    <td><IMG SRC="';echo'file:///C:/wamp/www/';$row['picture'];echo'">';echo'</td>
    
    
    
    
    <td>';echo $row["title"]; echo'</td>
    <td>';echo $row["desc"]; echo'</td>
    
    
    </tr>
    </table>
    ';
    }
    ////////////////////////////////////////////////////////code]
    
    
    

×
×
  • 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.