Jump to content

bmmayer

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bmmayer's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. error reporting is on! and even when i include mysqli_error() it still doesn't display it! in Safari it says "the server dropped the connection" It isn't a typical mySQL bug, its something else. I've never seen the browser not make a server connection at all because of a mysql error...
  2. And a follow up...so WEIRD This code gives this error: Warning: mysqli_fetch_object() expects parameter 1 to be mysqli_result, boolean given in /home/*****/public_html/new/mysqli_test.php on line 7 <?php $link = mysqli_connect("localhost", "*******", "********", "********"); $result = mysqli_query($link, "SELECT (*) FROM BENCHMARK"); while($get = mysqli_fetch_object($result)){ echo $get->FOO."<br />"; } ?>
  3. I am trying to run a very simple test script. This one works: <?php $link = mysqli_connect("localhost", "******", "******", "*******"); $result = mysqli_query($link, "SELECT FOO FROM BENCHMARK"); while($get = mysqli_fetch_object($result)){ echo $get->FOO."<br />"; } ?> This one doesn't work: <?php $link = mysqli_connect("localhost", "******", "******", "*******"); $result = mysqli_query($link, "SELECT * FROM BENCHMARK"); while($get = mysqli_fetch_object($result)){ echo $get->FOO."<br />"; } ?> In the second one, instead of "SELECT FOO FROM" I did "SELECT * FROM" (which you're totally allowed to do, right? WRONG. It seems that when I say "SELECT * FROM" mysqli_fetch_object (or mysqli_fetch_array) doesn't work. The weirdest thing is, it doesn't even return an error in the browser, it just comes up blank! Is this a PHP config issue or a code issue, or both? I should note that using mysql not mysqli works fine here, but we need mysqli for the app we're building so we can't use just mysql. Thanks for y'all's help in advance. -b
  4. yes, that's correct. as for ss32: it would be great if you could write something out for me; i have tried something like this and it didn't really work. thanks a lot, -b
  5. thank you, i look forward to your reply -b
  6. i can't post exact data for privacy reasons. this is the type of data: ...and so on
  7. hey all-- i am trying to parse a CSV file, which contains elements that have line breaks as well as quotes. Right now, i am using this function: function file_breakdown($content,$del){ ini_set('auto_detect_line_endings','1'); $file = fopen($content, "r"); $row = 1; while (($data = fgetcsv($file, 0, $del)) !== FALSE) { //loop content here } fclose($file); } the problem i'm having is that the function works fine when the cells that are being imported are normal--they contain no line breaks or quotes---but when it reaches a cell that has a line break, it creates a new "row" instead of maintains the current row. the quotes within the cells further confuse the program. in addition, i cannot designate the line breaks as being proceeded by a double quote (") because some quotes are typed inside the cells that are followed by line breaks. i need help telling the program to distinguish between the quotes that separate columns and quotes that are contained within the cells! and that doesn't think a line break within a cell means a new row. can anyone help me write a function that will take a csv file and return an ACCURATE array, with each value of the array being a $del-delimited line, like the information returned for the file() function? this has been driving me crazy. thanks for your help, -b
×
×
  • 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.