Jump to content

Search the Community

Showing results for tags 'mysql_fetch_array()'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 2 results

  1. i have found warning message = Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given inC:\xampp\htdocs\articles\artikel.php on line 7 <?php include 'koneksi.php'; $articleid = $_GET['articleid']; $sql_query = 'SELECT ta.*, tca.category_article FROM article_news AS ta INNER JOIN tcategory_article AS tca ON ta.category_article_id = tca.category_article_id WHERE article_id = '.$articleid; $query = mysql_query($sql_query); $row = mysql_fetch_array($query); //--> this is line #7 $msg = $_GET['msg']; if(!empty($msg)){ if($msg = 100){ echo '<h5 style="text-align:center; color:#f00; font-weight: normal">.</h5>'; } } ?> <!--articles--> <a name="TemplateInfo"></a> <input type="hidden" name="prodid" value="<?php echo $row['article_id'];?>" size="1"/> <h1><?php echo $row['judul'];?></h1> <p><a href=""><img src="images/upload/<?php echo $row['photo'];?>" width="100" height="120" class="float-left"></a> <p><?php echo $row['artikel'];?></a>. </p> <!--end of articles--> <p><?php echo $row['category_article'];?></p> <p class="post-footer"> <a href="index.html" class="readmore">Read more</a> <a href="index.html" class="comments">Comments (7)</a> <span class="date"><?php echo $row['tanggal'];?></span> </p> please help me i'm sorry newbie here..
  2. Hello I tried to move the bold section of the below code into a function getWeights() located in a m_weight.php file (I want to implement MVC pattern) <?php $get_weights_q = mysql_query (" SELECT * FROM users_weight WHERE weight_uid = '$user_id' ORDER BY weight_date DESC ", toctoc() ) or die(mysql_error() ); while ($weight = mysql_fetch_array($get_weights_q)) { ?> <li> <?php echo date( " d M-y H:i (l) " , $weight['weight_date']). ' : ' . $weight['weight'] . ' <a href="'.$_SERVER['SCRIPT_NAME'].'?del=' . $weight['weight_id'] . '">Changer</a> ' ; } ?> </li> </ul> ---------------- Here is the function: function getWeights($user_id) { $get_weights_q = mysql_query (" SELECT * FROM users_weight WHERE weight_uid = '$user_id' ORDER BY weight_date DESC ", toctoc() ) or die(mysql_error()); } The result is : Notice: Undefined variable: get_weights_q in H:\home\user\documents\DEV-H\EasyPHP-5.3.8.1\www\Food-Tribe\v_weight.php on line 44 Warning: mysql_fetch_array() expects parameter 1 to be resource, null given in H:\home\user\documents\DEV-H\EasyPHP-5.3.8.1\www\Food-Tribe\v_weight.php on line 44 If I let the code just above the While, in procedural mode it works fine... Any idea?
×
×
  • 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.