Problem Updating My DB

$result1 = mysqli_query($link, 'SELECT ID, ComicAuthor FROM ComicAuthor');
if (!$result1)
{
	$error = 'Error fetching Comics: ' . mysqli_error($link);
	include 'error.html.php';
	exit();
}
------------------------------------------------
$result = mysqli_query($link,
		'SELECT Comics.id, ComicNumber, ComicName, ComicTitle, ComicDate, ComicAuthor
		FROM Comics INNER JOIN ComicAuthor
			ON AuthorId = ComicAuthor.id');
if (!$result)
{
	$error = 'Error fetching Comics: ' . mysqli_error($link);
	include 'error.html.php';
	exit();
}

the first half of that wasnt a complete thought. How does the GET… ? get filled? Feel about being empty? Afford a condo on south beach?

I’m saying that “?” does. if i said “index.php?” it would point to index.php. ? with no qualifier defaults to ‘The URL that is currently in the browser location bar’.

I fixed it… obviously you where faster than me…

The GET gets filled by whatever comes after the ? on a URL.

index.php?var=foo&var2=bar

Means that $_GET contains:
$_GET[‘var’] (which contains “foo”)
$_GET[‘var2’] (which contains “bar”).

I’m not seeing anything glaring out at me in your code that says that the new inserts should not appear…

Thats what I have been saying… Why would it work on my computer (w/ a localhost), but not on the website?

First thing first… I just want to tell you I feel like a total dumb ass!

Last night I was in the middle of coding the site on my Laptop computer, and it was time to go home. Well when I got home, I wanted to use my Desktop, but could not find a memory stick, so thinking that I was rather genius, I uploaded the partially completed code to the website (which happened to be my comics.html.php file). Well as we all know, that when a browser reads PHP it converts it into HTML (more or less) and then displays the results… Well I then copy/pasted the View Source file, which mind you already had some DB results in it… I continued to fill in my HTML/CSS code leaving the original results in the table; so every time I would visit the site, I was not seeing RAW output, but HARDCODED HTML.

Hence… I feel like a total dumb ass!

Well that’d certainly do it…

Ok. Now that I have that fixed, I am running into a problems where the Add Comic is doubling up and inserting the same thing twice… what gives!! grr

What did I do wrong here? It was working until I tried to change some names around… and now… Who knows that the heck I did


//ARRAY TO GET COMIC LIST
$result = mysqli_query($link,
	'SELECT Comics.id, ComicNumber, ComicName, ComicTitle, ComicDate, AuthorId 
		FROM Comics INNER JOIN AuthorNo ON AuthorId ComicAuthor.id');

I am getting this error

Error fetching from Comic Listing: 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 ‘ComicAuthor.id’ at line 2

BTW. I have to Tables…

  1. Comics w/: id, ComicNumber, ComicName, ComicTitle, AuthorId
  2. ComicAuthor w/: AuthorNo, AuthorName

AuthorId ComicAuthor.id
to
AuthorId = ComicAuthor.id