Jump to content

Recommended Posts

when i do:

$result = mysql_query("SELECT path FROM cinos11_pages WHERE case='chatbox' ");
include($result);

it dont show when put into include and get this

Warning: include() [function.include]: Filename cannot be empty in /home/*in*s**/*in**s**.com/index.php on line 7

Warning: include() [function.include]: Failed opening '' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/*in*s**/*in**s**.com/index.php on line 7

Use a while loop & mysql_fetch_*

 

Here's a good tutorial (see the bottom example):

http://www.tizag.com/mysqlTutorial/mysqlfetcharray.php

 

I can't use the while loop.

It disrupts the php switch which i have set up.

The only way i found so far to come up with is to display only the necessary text.

What does your current code look like?

 

And doing this: $result is not the actual text results, its the MySQL resource.

when i do:

$result = mysql_query("SELECT path FROM cinos11_pages WHERE case='chatbox' ");
include($result);

it dont show when put into include and get this

Warning: include() [function.include]: Filename cannot be empty in /home/*in*s**/*in**s**.com/index.php on line 7

Warning: include() [function.include]: Failed opening '' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/*in*s**/*in**s**.com/index.php on line 7

What does your current code look like?

 

And doing this: $result is not the actual text results, its the MySQL resource.

when i do:

$result = mysql_query("SELECT path FROM cinos11_pages WHERE case='chatbox' ");
include($result);

it dont show when put into include and get this

Warning: include() [function.include]: Filename cannot be empty in /home/*in*s**/*in**s**.com/index.php on line 7

Warning: include() [function.include]: Failed opening '' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/*in*s**/*in**s**.com/index.php on line 7

I ended up fiquring out $result wasn't the one

So i tried using this one:

 

<?php

// Make a MySQL Connection

mysql_connect("****", "*****", "*****") or die(mysql_error());

mysql_select_db("cinos11") or die(mysql_error());

 

// Get a specific result from the "example" table

$result = mysql_query("SELECT * FROM cinos11_pages

WHERE name='chatbox'") or die(mysql_error()); 

 

// get the first (and hopefully only) entry from the result

$row = mysql_fetch_array( $result );

// Print out the contents of each row into a table

echo $row['path']." - ".$row['case'];

?>

 

 

and it didnt work......

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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