Jump to content

[SOLVED] fetch array


SJames

Recommended Posts

$result = mysql_query("SELECT * FROM page_content WHERE cID = '$cID'") or die ("Select Error");

$resultArray = mysql_fetch_array($result) or die ("Array Error");

 

It already connects properly and everything but when it gets to the fetch_array part, I get the "Array Error" error. I can't figure out why this doesn't work. mysql_fetch_row doesn't work either.

Link to comment
https://forums.phpfreaks.com/topic/69598-solved-fetch-array/
Share on other sites

<?php
mysql_select_db("mydb");/// need to select a database after connecting to script then do your query

$result = mysql_query("SELECT * FROM page_content WHERE cID = '$cID'") or die ("Select Error");




$resultArray = mysql_fetch_array($result) or die ("Array Error");?>

Link to comment
https://forums.phpfreaks.com/topic/69598-solved-fetch-array/#findComment-349766
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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