Error querying database.


Posted on 16th Feb 2014 07:03 pm by admin

I get the above error when trying to insert some values to a datatable.
Here's the code :

Code: $dbc = mysqli_connect('127.0.0.1:3306', 'root', 'xxxx', 'aliendatabase')
Did you know?Explore Trending and Topic pages for more stories like this.
or die('Error connecting to MySQL server.');

$query = "INSERT INTO aliens_abduction (first_name, last_name, " .
"when_it_happened, how_long, how_many, alien_description, " .
"what_they_did, fang_spotted, other, email) " .
"VALUES ('myFirstName', 'myLastName', '5 years ago', '2 years', '7 aliens', " .
"green eyes', 'we talked', " .
"'yes', 'none@gmail.com')";

$result = mysqli_query($dbc, $query)
or die('Error querying database.');

mysqli_close($dbc);

Any ideas on what am I doing wrong?
Thank you very much
No comments posted yet

Your Answer:

Login to answer
314 Like 35 Dislike
Previous forums Next forums
Other forums

convert static html data into dynamic
hi all

i need to convert a website which has static above 2000 articles into dynamic and add

Need help PLEASE
ok i have this warning showing up

Warning: in_array() [function.in-array]: Wrong datatype for

php/xmlrpc class issue
I am working on xml-rpc in php to start with.

I have a class that only has variables defined

Easy administration on MySQL databases
My website is database driven and I am very tired of manually making queries to my tables in order t

Taking an HTML form and a PHP program and making it into one working file.
Hello,

So I would like to display everything INSIDE a specific directory. In other words, I

SAP Treasury - Commodities
We are running SAP ECC 6.0 with Treasury Activated.
EA-FIN is also activated (SFW5).

IP question
ive got 2 ip addresses both global from same user how would i detect if they are local to each other

exclude characters from counting?
Hello, I wanted to ask if you have a string like:
Code: $my_s='ASRGREGTGTR----REGREGRE+++RRRRRR..

Open/Close Links in Php
Hello, Hoping someone can inform me how I can get PHP to automatically open a set of links in a new

Shopping Cart
Can anyone direct me to a Simple, Basic structure of a shopping cart.
New to classes. I want to s

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash