This site includes Projects (School coursework, work projects, independent projects, and freelance work) and my resume. This also serves as a place to post code and other programming-related information that I have found useful.

I also offer professional web development services for individual and small businesses.

Binding a DropDownList with a Stored Procedure

DropDownList ddlPhoneType = new DropDownList();

ddlPhoneType.ID = "ddlPhoneType";

ddlPhoneType.DataSource = dcDune.crmGetPhoneTypes().ToList();

ddlPhoneType.DataTextField = "name";

ddlPhoneType.DataValueField = "phoneTypeID";

ddlPhoneType.DataBind();

pnlPhone.Controls.Add(ddlPhoneType);

Tags: 

Update the Year in a DATETIME field

UPDATE tablename SET column=column-INTERVAL YEAR(column) YEAR+INTERVAL new year YEAR WHERE ID="ID";

Tags: 

Fatal error: Uncaught SCA_RuntimeException: Instantiation of unknown type

Fatal error: Uncaught SCA_RuntimeException: Instantiation of unknown type :http://Reward Reseller thrown in C:\...\Reward\SCA\Bindings\local\Proxy.php on line 138

This error is generated when using SCA for PHP. The cause of this error is most likely due to missing targetNamespace="http://Reward" in the xsd file

Tags: 

Backup an entire database to a file

mysqldump --opt -u username -p database name > backup.sql

Tags: 

Fatal error: Call to a member function bind_param() on a non-object

The cause of this error is most likely due to the statement object returning false when attempting to be created. The cause of the statement object returning false is that the SQL statement is incorrect. Try running the same SQL command line and see if you get errors there.


$updateStatement = "UPDATE $db_table SET refID = ? WHERE trans_num = ?";

$stmt = $mysqli->prepare($updateStatement);

if(!$stmt) echo "error"; //Will print "error"

$stmt->bind_param("ss", $newTransNum, $originalTransNo); //This fails

//The SQL statement is wrong (there is no field trans_num in the table)

Tags: 

Pages